I'm really puzzled. 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?