os trabalhos e os dias vivendo o sonho e a realidade ao mesmo tempo (1)

2Jul/101

Of load balancers and keep-alive.timeout and web pages working hard

Some web pages take a long time to load. This is not always a problem: it only means they they have a lot of work to do. Fine, just wait until they are done.

The problem is that sometimes something in the middle will decide how long is too long. Then you will get an error such as this (in Firefox):

"The connection was reset .
The connection to the server was reset while the page was loading."

Firefox - The connection was reset

This could be the browser giving up. For Firefox type "about:config" in the address bar and increase the value of network.http.keep-alive.timeout.

But... it can also be some other device in the way, such as a load balancer. Load balancers are one of those needed nuisances that always fail you. They may well decide that enough is enough and they are going to cut that connection, even if you really wanted to wait for the page to finish doing its job. If you can go around load balancers you can avoid these problems. If not... start optimizing that web page loading time to fit into whatever the load balancer thinks is enough or do your heavy work in the background (like you always should).