A PHP webpage is calling an AJAX script (querying DB) in pending. I had to stop it because it was called 2 hours ago. Whereas I tested it on another DigitalOcean server and it responded in 2 minutes.
The servers are similar (16GB RAM, 8CPU, etc…)
And the there is not much traffic.
I really don’t understand. The only differences I noticed are the servers are : MySQL versions and Ubuntu versions.
The 1st server : MySQL Server version: 5.5.52-0ubuntu0.14.04.1 (Ubuntu 14.04.2 LTS). And the 2nd one : MySQL Server version: 5.7.13-0ubuntu0.16.04.2 (Ubuntu 16.04 LTS).
The tables got the same indexes on the same tables that are queried.
Still, I don’t get where is the problem ?
Maybe from the SQL query ?
(P.S. : the SQL query works on our 2nd server)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Can you share some details on the page initiating the query or share the PHP function processing it? It’s possible with those times (2 minutes or more) you are hitting a timeout somewhere that is causing it to fail to return. If that’s the case it may just require a configuration adjustment. If your query is taking 2 minutes or more you may also want to look into whether you can optimize your table structure or indexes to improve performance as that is quite slow.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.