1

I installed a LAMP server and enabled MySQL remote connections but I'm experiencing really bad response times when connecting to the database remotely from a WordPress install.

I've been looking around for hours for a solution but all I could find had to do with setting "skip-host-cache" and "skip-name-resolve" to true. I've done that and I'm accessing the server via IP, but the problem still persists.

Server Details:

  • Ubuntu 12.04
  • Apache 2.2.22
  • MySQL 5.5.24

There are only a handful of people accessing the server so load isn't an issue either.

I'd really appreciate some help with this.

  • Can the remote MySQL server resolve DNS? What is the last mile connectivity on each server, – Ben Lessani Oct 02 '12 at 08:03
  • The MySQL server shouldn't be doing any DNS resolution because "skip-name-resolve" is set to true. The last mile connectivity on each server is a "standard" business ADSL connection (I'm unsure of the specifics, I'll have to wait until tomorrow to get more detailed information). – Greg Antowski Oct 02 '12 at 08:48
  • It still needs to resolve DNS regardless of whether you have set that flag or not. Given its over commodity ADSL connections - its not much of a surprise that its slow. – Ben Lessani Oct 02 '12 at 09:25
  • Please define: "slow response". Is connecting slow? Is transferring the data slow? Do the queries take ages to complete? – Bobby Oct 02 '12 at 10:05
  • Sadly, I'm starting to think you might be right, sonassi. @Bobby The queries complete very quickly and connecting to the server is fairly fast as well. The slowness seems to come from the actual data transfer. – Greg Antowski Oct 02 '12 at 10:35
  • Just because I've experienced something similar right now...can you `OPTIMIZE` the tables and check again? – Bobby Oct 02 '12 at 10:49
  • Unfortunately I can't right now as I don't have access to the server. I'll give it a go tomorrow and report back, thanks. – Greg Antowski Oct 02 '12 at 10:57
  • Just to update this, the issue was the connection between the servers. 270ms - 350ms delay when pinging. – Greg Antowski Oct 03 '12 at 06:14

0 Answers0