Hacker News new | ask | show | jobs
by Laforet 1470 days ago
It does not matter how fast the backend is. A persistent HTTP connection will last 60 seconds following the latest client request, unless the browser goes out of its way to explicitly close the connection.

P.S. OP's website uses Apache but the same issue of overly conservative limits still apply.

2 comments

There's no way the connection just sits idle and the worker can't serve other requests for the full timeout, right? That just sounds... Wrong. And is not consistent with load testing I've done before with a nginx setup
Apache will spawn a process (at least with pfork) and the process will wait for a keep alive connection to send a new req.

Everything old is new again. Gotta tune it out.

Is this true? So Apache basically launches a Slowloris attack on itself for every connection?
With prefork there is one process per connection. Look at server-status. There was a threaded version as of 2.4 but I don’t think it worked well.
Depends on the concurrency ability of the web server (async) or parallelism (threads)
I can’t imagine a case where the browser wouldn’t do the decency of closing a connection.
I would expect they keep it open for an improved user experience. Much like the prefetching that browsers seem to do by default.