Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.