Php file uploads result in "connection reset" error
We are running into a problem when uploading files (specifically images) via php. What happens is that the upload will stop and the user will receive the following message in their browser:
The document contains no data.
The network link was interrupted while negotiating a connection. Please try again."
It doesnt happen all the time, and the larger the image to be uploaded, the more prevalent the problem seems to be. 20k images usually upload without a problem, but 500k images may have a problem 75% of the time.
What is somewhat strange is that on non-live servers (servers with no traffic) the problem does not exist, and the images upload without issue. Sending production traffic to the same server causes the problem to surface.
I have tried with the following litespeed/php combinantions:
The problem persists with all combinations.
I have tried adjusting the various timeout values, but they dont seem to have any impact. The time elsapsed before the error is retured varies per upload attempt -- sometimes it will be 5 sec, sometimes more than 60 sec, even when the file being uploaded is the same size each attempt.
Enabling DEBUG logging seems to show the following at or around the time of the connection reset:
[DEBUG] [idle] [ExtConn] close()
We are using lsapi in all cases and the image uploads are taking place over SSL. The problem seems to exist when using any browserr and therefore does not appear to be browser-specific.
Any help tracking down the cause of these connection resets and how to resolve them would be much appreciated.