Ticket #607 (closed defect: fixed)
lighttpd + mod_ssl stalls on POST requests between 8317 and 16381 bytes long
| Reported by: | jtate@… | Owned by: | jan |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | core | Version: | 1.4.11 |
| Severity: | normal | Keywords: | |
| Cc: | Blocked By: | ||
| Need User Feedback: | Blocking: |
Description
# My lighttpd.conf file
server.modules = ( "mod_access",
"mod_alias",
"mod_scgi",
"mod_accesslog",
"mod_rewrite",
"mod_staticfile" )
server.port = 8003
server.document-root = "/home/jtate/mercurial/tp/raa"
var.logbase = "/tmp"
#Note that this is required if you wish to run multiple lighttpd processes
server.pid-file = "/var/run/raa-lighttpd.pid"
server.errorlog = var.logbase + "/lighttpd.error.log"
accesslog.filename = var.logbase + "/lighttpd.access.log"
mimetype.assign = ( ".js" => "text/javascript",
".css" => "text/css",
".png" => "image/png",
".jpg" => "image/jpeg",
".gif" => "image/gif",
".ico" => "image/x-icon"
)
alias.url = (
"/favicon.ico" => server.document-root + "/content/images/favicon.ico",
"/static/" => server.document-root + "/content/")
$HTTP["url"] !~ "^/(static/|favicon.ico)" {
scgi.server = (
"/" =>
( "127.0.0.1" =>
(
"host" => "127.0.0.1",
"port" => 4000,
"check-local" => "disable"
)
)
)
}
ssl.engine = "enable"
ssl.pemfile = "/etc/ssl/pem/raa.pem"
Note that the hang doesn't seem to happen from Firefox when posting this amount of data, but does happen in both perl (LWP) and python (httplib) test programs we wrote (which we will upload soon). Turning off SSL also seems to stop the stall.
Also of note, when the client times out, a protocol error is what is reported, but if the client is killed, lighttpd finishes the request: opens the connection to the scgi server and processes the request, as if the server is waiting for something more from the client before actually doing any work.
It's not important what scgi app is served since an strace shows that no connection is even opened to the scgi server for the failing requrest.
Another interesting point is that the same thing happens between 24701 and 23765 bytes. Another stall range starts at 41085. For every 16K of post data there is a 8065 byte windo where a request will stall lighttpd.

