Question

I issue a simple GET request to my server, and it's coming back after ~1.2 seconds on average (using firebug NET tab, the "waiting for reqponse" part- not even the whole reponse time)

My ping to the server is 0.250

Using Passenger with rails 2.3.3, in the rails log the request is taking ~0.023

My server is on GoDaddy, so I checked their homepage with firebug also- the "waiting for reqponse" time for their page is ~0.320

Worst case should be around 0.4... so where did I lose the other 0.8 seconds?

What else can I check?

Edit:

Seems like it's unrelated to rails- An image request (that only apache responds to, doest hit the rails at all) takes ~1.2 seconds also

Was it helpful?

Solution

Try setting PassengerPoolIdleTime to 0 in your Servers or VHosts configuration. Maybe your server is shutting down the application instances to fast and spawns a new instance with every request which usualy takes quite long.

Take a look at the documentation for more information on this setting: http://modrails.com/documentation/Users%20guide%20Apache.html#PassengerPoolIdleTime

OTHER TIPS

GoDaddy may have a reverse-proxy between you and your HTTP server.

They may be doing something like sending you the response headers right away, then possibly serving you the contents of the response from cache.

So, from the standpoint of your HTTP server, the response is transmitted. Then it goes to GoDaddy's reverse-proxy, then finally to your web browser.

Where your files are hosted from for GoDaddy is not the same as where their homepage is hosted from.

Have you checked other pages you have hosted on the same server? Possibly due to database connections or "slow" connections like that can cause the page to take awhile before it's sent back to the client.

Doesn't sound like it is your problem, but the ISP's.

Can you do a wget to an internal ip/port to your rails app directly (or apache) from the same server? That will tell you if the probaby is in the app stack or further upstream.

If you can, you can use apache tool, called ab "apache benchmark" to help.

The key is having a ssh access to your computer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top