Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is sometimes a 1-2 second delay when connecting to port 80 (nginx) over the public interface.

It occurs 50% of the time.

Once connected nginx serves all requests, including fastcgi proxy requests, lightning fast.

I have confirmed it is not a DNS resolution delay on the client side.

OS is Linux 2.6

What should I check to find out what is causing this initial delay to accept?

share|improve this question
Are you sure it's not a DNS reverse lookup delay on the server side? – rakslice Aug 30 '11 at 9:35

I would start with two things. First get a pcap capture of the connection both when it is working and when its slow. You can use wireshark or tcpdump to do this. Wireshark will give you a nice GUI to look at it to compare. The second is to enable connection debugging in nginx. If the network capture looks good then you'll probably see some resource issue in nginx. Both should have timestamps in the output so you can see where you are losing time!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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