Ticket #881 (new defect)

Opened 2 years ago

Last modified 2 years ago

memory usage when ssl.engine used and large data uploaded through CGI

Reported by: anonymous Assigned to: jan
Priority: normal Milestone:
Component: core Version: 1.4.12
Severity: normal Keywords: ssl memory
Cc: Blocking:
Need Feedback:

Description

system specs: Red Hat Enterprise Linux 4, 2.6.9-34.0.2.ELsmp kernel, lighttpd-1.4.12 (built with ssl support), 4Gigs memory, openssl-0.9.7a-43.8
This problem does not happen when not using the ssl.engine. Below is my lighttpd.conf file, a CGI perl script, and a client perl script to hit the CGI perl script. It simply uploads a file and write is to /tmp.
lighttpd is configured such that the files in the document root are treated as cgi (for example, creating a soap service to be executed through cgi). The certificate being used by lighttpd is a self signed certificate (which should not matter).
The contents of the test file I use (testfile.dat) that gets uploaded should not matter (I've tried different files and got the same behavior). To recreate this, for example, simply use a file around 130 megs.
When the ssl.engine engine is enabled, uploading the 130Meg test file causes lighttpd to eat over 130Megs of memory (over 3% according to top)- and it keeps it and never releases it. When another file is uploaded - larger than the first, more memory is used - and the memory not released. However, if a smaller file is then uploaded the memory usage will drop back down to the 130Megs. It remains there even when lighttpd is idle.
When the ssl.engine is NOT enabled this is not the case. It uses a little memory while the file is uploaded, but then goes back to 0% usage and the memory footprint of lighttpd returns to being normal (about what it is at startup).
I'm sure the memory usage while the file is being uploaded with ssl is due to how ssl works. But, I didn't expect lighttpd to continue to keep the memory after the upload was complete.

Attachments

lighttpd.conf (0.7 kB) - added by anonymous on 10/03/2006 10:23:27 PM.
upload_file.pl (321 bytes) - added by anonymous on 10/03/2006 10:24:00 PM.
testapp (0.8 kB) - added by anonymous on 10/03/2006 10:32:10 PM.
n93.jpg (19.1 kB) - added by anonymous on 04/13/2007 09:05:43 PM.

Change History

10/03/2006 10:23:27 PM changed by anonymous

  • attachment lighttpd.conf added.

10/03/2006 10:24:00 PM changed by anonymous

  • attachment upload_file.pl added.

10/03/2006 10:32:10 PM changed by anonymous

  • attachment testapp added.

(in reply to: ↑ description ) 10/03/2006 10:33:41 PM changed by anonymous

I had to base64 encode the testapp perl script because Trac kept flagging it as spam. So, you'll need to decode it before using

04/13/2007 09:05:43 PM changed by anonymous

  • attachment n93.jpg added.

Add/Change #881 (memory usage when ssl.engine used and large data uploaded through CGI)




Change Properties