Lighttp and Fileupload on Windows

A customer of us deploys a Rails app on a Windows platform. We are using

It was a pretty straightforward process to setup and configure this stack, following one the online documentations. How happy we were when everything worked and we could hit our Rails app from the browser. Everything ? Ahhhh… not exactly. File upload did not work properly. Only one out of 10 uploads would succeed, the other would fail after around 60 seconds. The browser should an “Connection Timed Out” error message, the access and error logs of Lighty did not give much information.When we had IIS rewrite to one mongrel directly then the upload worked, so the problem was somewhere with Lighty. Digging around in the Lighttpd forums and documentation brought up following configuration options which could be relevant for fileupload:

  • server.max-request-size (defaults to 2 GB so there should be no problem)
  • server.upload-dirs (Make sure this is a valid Windows directory with write permissions)
  • server.network-backend (Unclear which backends are available for Windows)
  • server.max-read-idle (defaults to 360 seconds)
  • server.max-read-idle (defaults to 360 seconds)

We solved our problem by setting the server.network-backend to ‘writev‘ (a bit obscure but hey… it worked)

back

Leave a Reply