Project

General

Profile

[Solved] "write() failed due to: Broken pipe " error when doing CGI upload

Added by kiran over 8 years ago

Hi,

I am using lighttpd as webserver for Luci, the lua based web-framework.

I am using the following manual to configure lighttpd:

http://wiki.openwrt.org/doc/howto/luci.on.lighttpd

We need to upload a big file using a slow connection through the web-interface. Sometimes we get 500 internal error and this is the message in lighttpd log:

2015-08-30 15:51:18: (log.c.166) server started
2015-08-30 15:52:10: (mod_cgi.c.1152) write() failed due to: Broken pipe
2015-08-30 15:52:10: (mod_cgi.c.1411) cgi died ?

Can someone let me know in what scenario this happens? Does this happen when the CGI script crashes or go out of memory or something?

Regards,
Kiran G


Replies (1)

RE: [Solved] "write() failed due to: Broken pipe " error when doing CGI upload - Added by gstrauss about 7 years ago

Yes, on low-memory systems, uploading a large file can result in out-of-memory errors.

Versions of lighttpd since lighttpd 1.4.40 handle this better as long as you have enough space in your temporary directory. Use openwrt 15.05.1 to get opkg of lighttpd 1.4.42 (or later).

    (1-1/1)