Friday, November 18, 2005

 

lighttpd writev problem and solution


Problem

I am hosting Pflegewiki using lighttpd (version 1.4.7) + FastCGI-PHP.
Two days ago I got emails from users which had problems uploading files (503 - Service Not Available). I could reproduce this problem only trying to upload large files (> ~100Kb).

The logfile said:
2005-11-18 10:27:41: (network_writev.c.276) write failed: Bad address 16
2005-11-18 10:27:41: (mod_fastcgi.c.2751) write failed: Bad address 14


Workaround

As a temporary workaround I switched network backend from "writev" to "linux-sendfile":
server.network-backend = "linux-sendfile"
#server.network-backend = "writev"

It works and should peform better than "writev", Jan said.

Solution

I was about to submit a bug report so I searched for "writev" here and found a patch (changeset #829) which solves this issue. After patching and switching back to "writev" everything worked fine.

However, I use "linux-sendfile" anyway, now.

Update: blogger.com sucks. I had to delete tons of entries... Sorry.

This page is powered by Blogger. Isn't yours?