Project

General

Profile

Actions

Bug #1902

closed

lighttpd can leak connections

Added by daveb about 15 years ago. Updated almost 8 years ago.

Status:
Obsolete
Priority:
Normal
Category:
-
Target version:
ASK QUESTIONS IN Forums:

Description

Hi,

It is possible for lighttpd to "leak" connections if response content handlers expect more data from the upstream server, but never get it. This seems to happen most frequently when using lighttpd as a reverse proxy in front of Tomcat. Tomcat sometimes fails to send a complete chunked response through mod_proxy_backend_http.c, and the FSM in that file never marks the request as finished. The connection stays in CON_STATE_WRITE_RESPONSE_CONTENT forever, and it is never timed out, because the write_request_ts is updated even though no data are written.

We found that around 1 in every 10,000 requests caused a connection to go into this loop, so we accumulated (at our traffic levels) around 1,000 dead connections per day, leading to gradually increased CPU usage and so forth. The mod_status handler would show thousands of connections that had been in the 'W' state for days. We ended up having to restart lighttpd on a fairly regular basis to keep this problem at bay.

-dave


Files

lighttpd_bug1902.patch (739 Bytes) lighttpd_bug1902.patch daveb, 2009-02-16 01:56
Actions #1

Updated by daveb about 15 years ago

We were able to solve this problem with the attached patch.

-dave

Actions #2

Updated by stbuehler about 15 years ago

  • Target version set to 1.5.0
Actions #3

Updated by gstrauss about 8 years ago

1.5.x branch has been abandoned. Please withdraw ticket.

Actions #4

Updated by gstrauss almost 8 years ago

  • Missing in 1.5.x set to Yes
Actions #5

Updated by gstrauss almost 8 years ago

  • Status changed from Patch Pending to Obsolete
Actions

Also available in: Atom