Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: open
Last night my dedicated database server (MySQL) got rebooted (data center maintenance) and from then on database queries from my webserver, just 1 hop and 0.2 milliseconds (via traceroute) take ages. (Everything was fine before.)
An example query like 'SELECT this FROM that WHERE some_condition_met' from my webserver takes 10 seconds to execute, but the same query performed on the database server itself takes only 0.01 seconds (done via cli).
So it's not a query issue, it could be done much faster.
File transfers between the two hosts take place at 20-30 MB/sec, but the result set of this query is about 1 MB in size.
So it's not a bandwith issue, it could be done much faster.
Profiling shows that it's 'sending data' that takes 10 seconds, but why?
It should be done in 0.2 or 0.3 seconds, maybe 0.5.
I'm clueless right now and don't even know what to look for. No configuration changes, no different startup parameters, network connection just fine.
Does anybody have an idea what's going wrong here?
The support people say it must be a problem in the network hardware.
I thought about something like that also, because everything works fine when working on the machine locally without any net traffic involved.
So nothing new yet, I'll keep you informed.
You might have some broken tables.
I run an analyze and optimize on all your tables.
Be careful when running the optimize, as it will lock the tables and if you have any active site accessing the database, it will be locked out for the duration of the optimize process.
let us know what happened in the end!