Feature #1070

Huge memory allocation using SSL with webdav

Added by Anonymous over 8 years ago. Updated over 6 years ago.

Status:FixedStart date:
Priority:NormalDue date:
Assignee:jan% Done:


Target version:1.4.23
Missing in 1.5.x:


I'm using the lighttpd mod_webdav over SSL. When I transfer big files (about 100~200 MByte) to the webdav-server lighttpd allocates very much memory.

As I looked through the source I have seen that there is a loop in connections.c which reads as much data as possible from the SSL-Socket before the request is written to tempfiles on disk. In my case this means that the whole file was read into memory in this loop.

I have made a very small change which resolves my problem. The loop is left either when no more data is read from SSL or 5 MByte data is read. Now the memory consumption is much lower than before.

-- stefangmeiner

ssl-memory.patch Magnifier - Patch to connection.c -- stefangmeiner (227 Bytes) Anonymous, 2007-03-04 20:15

Associated revisions

Revision 2480
Added by stbuehler over 6 years ago

Limit amount of bytes read for one read-event (fixes #1070)


#1 Updated by stbuehler about 7 years ago

  • Target version changed from 1.4.20 to 1.4.21

#2 Updated by icy almost 7 years ago

  • Target version changed from 1.4.21 to 1.4.22
  • Pending set to No
  • Patch available set to Yes

#3 Updated by stbuehler over 6 years ago

  • Target version changed from 1.4.22 to 1.4.23

#4 Updated by stbuehler over 6 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2480.

Also available in: Atom