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 188.8.131.52... connected * Connected to rohitnair.info (184.108.40.206) port 80 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.19.7 (i386-redhat-linux-gnu) libcurl/7.19.7 NSS/220.127.116.11 zlib/1.2.3 libidn/1.18 libssh2/1.2.2 > Host: rohitnair.info > Accept: */* >
* 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!