I've a weird issue with my wordpress website ( http://rohitnair.info/) . The "first request" takes ages to respond. Any subsequent requests behave normally. Things I've observed while debugging

  • Clearing the browser cache and reloading works fine and the page loads fast enough
  • Clearing the cookies and reloading reproduces the issue.

I thus define "first request" in this context as a request with no cookies set for the domain. Another easy way to reproduce this issue is to use curl and not send any cookies. This is the output of curl -v

$ time curl -v rohitnair.info
* About to connect() to rohitnair.info port 80 (#0)
* Trying connected
* Connected to rohitnair.info ( port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (i386-redhat-linux-gnu) libcurl/7.19.7 NSS/ zlib/1.2.3 libidn/1.18 libssh2/1.2.2
> Host: rohitnair.info
> Accept: */*

long wait


* Connection #0 to host rohitnair.info left intact
* Closing connection #0

real    1m0.518s
user    0m0.003s
sys 0m0.011s

As can be seen, the server takes more than a minute to return the response.

The stack is wordpress + nginx and hosted on Amazon EC2. I've also noticed that the request does not show up in the nginx access log till the response is served or the request is cancelled (not sure if this is expected behavior) I'm completely lost as to what could be causing this issue. Any help would be much appreciated!

  • I think it's a problem with your connection because the website does not show slow response even on teh 1st request. Beside this I think you have other issues, like error in JS code popping up on IE8 in this JS line document.getElementsByTagName("head")[0].insertBefore( corecss, document.getElementById("syntaxhighlighteranchor") ); and also CSS/HTML issues, because the contents show up all sticked to the right with not even 1px body padding, Safari5 shows also a MALAWARE warning when visiting your site. – Marco Demaio May 2 '12 at 12:27
  • Thanks for the comments, will take a look into each of them. I think I've figured out the issue of slow first response, it was related to some DNS lookup issues. – Rohit Nair May 2 '12 at 19:25

Pingdom rates your site 77/100 (which is good), so, with the report of malware above I'm wondering if the problem might be local antivirus or anti-malware software blocking an attack - Microsoft security essentials often appears especially slow. It could also be a slow pickup on the database connection, which is common on shared hosting for wordpress.

Sucuri SiteCheck and virustotal both report your site is infected. I'd reccommend you take a look at this post on cleaning and securing an attacked wordpress.

You also appear to have significant layout issues in safari and firefox.

  • Yup, the site was infected. Found a few backdoors in the code. Thanks! I'd never have thought of that. – Rohit Nair May 3 '12 at 4:18
  • @RohitNair no problem, glad it helped. – toomanyairmiles May 3 '12 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.