Drupal response time incredibly slow, but only from some end-users I am running across a super strange issue that is killing me. I am seeing response times coming back from my Drupal site of nearly 5+ minutes, but only for some end-users.

I have tested and ruled out a DNS problem. Pings comeback with 100ms response times, and when I swap the Drupal index.php out for a static index.html file, response time is lightning for all users.

I have an end-user in Argentina that sees 4 sec response times, and then when I try from my machine here in Los Angeles, 5+ min. The server is hosted on EC2 in their Virginia data center.

I have also tail'd the access logs and I see the Argentina user's traffic come in right away, but my traffic takes forever to show in the logs.

Is there anything in the Drupal configuration that you can think of that would cause something like this?
These kind of problems are extremely hard to debug, because it can be one of a million things. My bet is that there's some server misconfiguration.

If I was in your position, here's what I'd try to do:


Try to reproduce the problem reliably - If you can reproduce this 100% of the time, then you know you have some method to reliably recreate the problem that you're facing. Try to identify any recent changes that might have caused this -- has it always been like this, or did you do something recently to cause this?
Isolate the problem - You're most likely running on a LAMP stack. I doubt your OS is a problem, but it's most likely related to the Apache, MySQL or PHP side of things. Double check your php.ini settings, then your mySQL settings, and then your Apache settings.
Debug / Profile - There's a bunch of ways to do this. Try the devel module and performance modules. If you're comfortable writing code and developing modules, try using debug statements to figure it out. If you're more advanced, profile your site using xdebug.


Good luck.

EDIT: I missed the part of about you running on EC2 -- still, the issue still stands. See if you can reproduce it reliably, and jump straight to profiling / debug.