Remote MySQL latency very high
Having severe delay when connecting to cPanel MySQL using remote SQL.
I had this problem a couple of years ago and decided it must have been my legacy scripts causing the issue. I've since rewritten my connection scripts using PDO and the problem still remains across all my cPanel servers.
If I run my new development on the cPanel server running localhost I get a total executive time of 8ms which is very fast.
If I run on my local machine but set to the IP of my server the total script execution time is 600ms.
It can't be anything local on my Wamp as on my Mac with MacOS's native install of PHP it does exactly the same thing.
Is there any way to speed up the connection? I disabled the firewall too so no issues from that.
-
Hello @Gareth-AWD, The type of issue you described typically relates to the connection between the cPanel server and the remote server. For instance, have you tried running the "traceroute" command from your local server to the cPanel server to see the results? How far away are the two servers geographically? Thank you. 0 -
Thanks for the feedback. I appreciate I'm using non server based broadband to connect but thought 600-1000ms was high. I tried two locations with similar results and we're about 100 miles away from where the server is. General delay of pinging the server is about 80-100ms. It seems to just be when connecting to MySQL is the issue. 0 -
Hello @Gareth-AWD, Here are a few StackOverflow topics (and one Drupal topic) that you may find helpful: Remote mysql server speed PHP remote MySQL database connection is very SLOW Slow mysql connection to remote DB Remote database desperartely slow | Drupal Groups Let us know if this helps. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments