0

I need your helps for this issue.

I created view name stock_view for a table from my database. Everything working well on my local (create and view on phpmyadmin are ok).

Since I ran command to create view on Server. It's table view is created successfully but if I clicked on stock_view, then it took long time then it showed a message :

enter image description here

I ran a query but it has no response too

SELECT * FROM stock_view

Here is my server information:

Server type: MySQL Server version: 5.7.36-0ubuntu0.18.04.1 - (Ubuntu) Protocol version: 10 Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation

PHP version: 7.2.34-26+ubuntu18.04.1+deb.sury.org+1

Version information: 4.6.6deb5ubuntu0.5

I changed proxy_read_timeout but no luck. I think it is problem with Mysql on my server. I'm using Vestacp for creating web server.

Thank for your help.

Hai Tien
  • 2,929
  • 7
  • 36
  • 55
  • @KenLee sorry I removed it. It is not relevant – Hai Tien Nov 12 '21 at 14:37
  • How much data is in that view? The error message suggests that MySQL hasn't responded to phpMyAdmin in the allotted time, which makes me think this is either a huge set of data or some very complex calculations. If you SELECT the view in the command line client, how long does it take to get the results? – Isaac Bennetch Nov 14 '21 at 14:48
  • @IsaacBennetch You are right. It takes long time because it is large database (about 500k records). In local, it takes about 2s. In server, it takes long time because my server has only 2G ram. – Hai Tien Nov 14 '21 at 15:45
  • I’m not sure if I have a good answer for you in this case. You might be able to tweak some timeout settings but if MySQL itself isn’t responding properly, perhaps you can optimize your database a bit (with improved indexing or the like)? – Isaac Bennetch Nov 14 '21 at 17:37

0 Answers0