Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lighttpd: disable CGI buffering

Tags:

cgi

lighttpd

Is there a way to stop lighttpd from buffering POSTs to a CGI executable?

It seems to me that all requests are fully buffered on disk before they are forwarded to the CGI executable, which makes it impossible for me to process the input in a stream-based way.

To clarify, I'm only talking about the request that is forwarded to the CGI executable on the standard input; I've already verified that the response is not buffered like that, and streaming output is indeed possible.

like image 394
lxgr Avatar asked Feb 10 '13 21:02

lxgr


1 Answers

  • server.stream-request-body = 0 (default) buffer entire request body before connecting to backend

  • server.stream-request-body = 1 stream request body to backend; buffer to temp files

  • server.stream-request-body = 2 stream request body to backend; minimal buffering might block upload

when using HTTPS, it is recommended to additionally set ssl.read-ahead = "disable"

https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_stream-request-bodyDetails

like image 130
Tamás Zahola Avatar answered Oct 09 '22 06:10

Tamás Zahola