Getting connection was dropped after accept() (perhaps the gw process died) while uploading large files through lighttpd.
While I am uploading small files like 2-3 MB, it works fine but if the file size is > 50 MB, Getting the below error.
2021-05-11 08:50:18: (/usr/src/debug/lighttpd/1.4.54-r0/lighttpd-1.4.54/src/gw_backend.c.1843) connection was dropped after accept() (perhaps the gw process died), write-offset: 263274 socket: tcp:169.254.160.50:1030
I am using lighttpd, gunicorn and flask app.
I have tried by setting server.network-backend = "writev" and even "write" but nothing helps.
My upload-dirs path is correct and have all permissions.
Updated by gstrauss about 1 month ago
connection was dropped after accept() (perhaps the gw process died)
lighttpd issues this after
connect() succeed to the backend (your gunicorn/flask), and an attempt to write to the backend fails with one of EPIPE, ENOTCONN, or ECONNRESET.
This does not sound like an issue with lighttpd, but rather your code. Perhaps your code is returning a response and then immediately closing the connection prior to reading the request body data.
You can try adding this to your lighttpd.conf:
server.stream-request-body = 2
Even though this does not appear to be an issue with lighttpd, lighttpd 1.4.54 was released May 2019, almost two years ago. The latest lighttpd release is lighttpd 1.4.59. Have you tested with lighttpd 1.4.59 to see if your issue has already been addressed?
Also available in: Atom