FAQ: lighttpd memory leak (2009-04-10)

Document created by Aaronwu Employee on Aug 28, 2013Last modified by sonic on Sep 8, 2013
Version 2Show Document
  • View in full screen mode

2009-04-10 16:36:39     lighttpd memory leak

Tihomir Culjaga (CROATIA)

Message: 72519   

 

hello,

 

 

 

I'm using lighttpd-1.4.19 with mod_cgi, mod_access and mod_auth.

 

on the web side i have cgi scripts writen in C. Almost everytime i refreash a webpage i get a memory leak.

 

Lighttpd memory usage incrises in steps of 4k.

 

 

 

Fri Apr 10 22:28:05 CEST 2009

3993 root       1192 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:09 CEST 2009

3993 root       1192 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:15 CEST 2009

3993 root       1196 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:19 CEST 2009

3993 root       1200 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:22 CEST 2009

3993 root       1208 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:24 CEST 2009

3993 root       1212 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:26 CEST 2009

3993 root       1212 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:28 CEST 2009

3993 root       1216 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:29 CEST 2009

3993 root       1216 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:30 CEST 2009

3993 root       1220 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:31 CEST 2009

3993 root       1220 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:32 CEST 2009

3993 root       1224 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:33 CEST 2009

3993 root       1224 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:33 CEST 2009

3993 root       1224 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:34 CEST 2009

3993 root       1228 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:35 CEST 2009

3993 root       1228 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:36 CEST 2009

3993 root       1228 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:37 CEST 2009

3993 root       1232 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:38 CEST 2009

3993 root       1232 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:39 CEST 2009

3993 root       1232 D   lighttpd -f /etc/lighttpd.conf -D

4588 root       1232 R   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:44 CEST 2009

3993 root       1240 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:50 CEST 2009

3993 root       1252 S   lighttpd -f /etc/lighttpd.conf -D

root:~> date; ps | grep lig | grep -v grep

Fri Apr 10 22:28:51 CEST 2009

3993 root       1252 S   lighttpd -f /etc/lighttpd.conf -D

 

 

I tried to set

 

settings.h:

 

BUFFER_MAX_REUSE_SIZE= 0

 

and recompile!

 

 

 

lighttpd.conf:

 

server.max-request-size = 300000

server.max-keep-alive-requests = 10

server.max-keep-alive-idle = 5

 

 

and restart lighttpd

 

 

 

Also, i applied:

 

lighttpd-1.4.x_request_header_memleak.patch and lighttpd-1.4.19.memory.leak.patch

 

but it is still leaking

 

Anyone knows why?

QuoteReplyEditDelete

 

 

2009-04-12 10:44:40     Re: lighttpd memory leak

Tihomir Culjaga (CROATIA)

Message: 72549   

 

does anyone use lighttpd at all ?

QuoteReplyEditDelete

 

 

2009-04-12 18:48:58     Re: lighttpd memory leak

Mike Frysinger (UNITED STATES)

Message: 72557   

 

people tend to use boa ... but even then, the better place to ask about memory leaks in a specific package is the package's homepage

 

  www.lighttpd.net/

Attachments

    Outcomes