Ticket #1642 (closed defect: fixed)
Lighttpd 1.4.19 Memory Leak
| Reported by: | remi@… | Owned by: | jan |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | core | Version: | 1.4.19 |
| Severity: | major | Keywords: | memory leak |
| Cc: | Blocked By: | ||
| Need User Feedback: | no | Blocking: |
Description
I was attempting to upgrade lighttpd from 1.4.18 to 1.4.19 (in order to pull in the security fixes) for our site, but it never made it through testing. Specifically, when I use apachebench to throw a lot of traffic at it, lighttpd 1.4.19 grows in an unbounded way. It appears that there is a memory leak in the server. After approximately one million hits, the lighttpd process had grown to be more than 600MB in size.
I have created two identical server images -- one with lighttpd 1.4.19 and one with lighttpd 1.4.18 plus the DOS patch lighttpd-1.4.x_high_load_dos.patch. When I send identical traffic to each of them, I see the following results.
lighttpd 1.4.18+dos_patch memory usage (DRS/RSS) before traffic: 4276 / 2140 lighttpd 1.4.18+dos_patch memory usage (DRS/RSS) after traffic: lighttpd 1.4.19 memory usage (DRS/RSS) before traffic: 4267 / 2132 lighttpd 1.4.19 memory usage (DRS/RSS) after traffic: 227863 / 226004
The URLs requested were all very small files (most smaller than 1,024 bytes; all smaller than 4,096 bytes) that lighttpd is supposed to send using x-sendfile. Basically the request comes in and is sent through to an FCGI backend which responds with an x-sendfile location that lighttpd then sends.
I will attempt to respond to this ticket with more valgrind information as I garner it.

