Project

General

Profile

Bug #1902

lighttpd can leak connections

Added by daveb over 10 years ago. Updated about 3 years ago.

Status:
Obsolete
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
2009-02-16
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:
Yes

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

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

History

#1

Updated by daveb over 10 years ago

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

-dave

#2

Updated by stbuehler over 10 years ago

  • Target version set to 1.5.0
#3

Updated by gstrauss over 3 years ago

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

#4

Updated by gstrauss about 3 years ago

  • Missing in 1.5.x set to Yes
#5

Updated by gstrauss about 3 years ago

  • Status changed from Patch Pending to Obsolete

Also available in: Atom