[Resolved] Problems with large file uploads

I am running a file hosting site. I recently switched over to Litespeed on one of my large storage boxes as Nginx+PHP-FPM wasn't handling file uploads properly, but mainly due to lack of support from nginx. I was hoping that LS wouldn't have the same problem, but unfortunately it does

The problem is, large file upload don't work. Problems happen when I try to upload a 300MB+ file that takes around 12 mins to upload. My PHP app receives the file once the web server okays it, but if my app can't find it/LS didn't pass the uploaded file to my app. However, a 100 MB file takes around 3-4 mins to upload and works out just fine. But, when I upload a 330MB file from a slower connection that takes around 80 mins to complete, LS just doesn't accept it. I mean, I can see LS taking in the full upload, but something unknown just happens when the file upload is complete. Although, I have set the connection timeout to the maximum possible, but it just doesn't work. I'm beginning to believe it could be a system/memory cache issues. Any ideas?

When upload the 300MB file, have you noticed that LSWS storing the request body in the swap directory? If you do, it means LSWS accepts and receives the request.
You can turn on debug logging and check if LSWS send the request body to PHP successfully or not.
There might be a problem on PHP side when receiving the request body from LSWS. First thing is memory limit, PHP uses a lot of memory handling a large upload. The memory limit should be set high enough, check error log and stderr.log see if there are memory related errors from PHP.

Alright, so got the 4.1RC3 installed, but the same problem persists! A 100MB file that took around 15 mins to upload was not received by my PHP script. However, a 330MB file that took around 14 mins to upload was received just fine... What shall I do here now?

Something else I should note down here. I have /dev/shm/ls/swap for ls swap and /dev/shm for php temp location. When file uploads are in progress, I can see the same file being written at both the swap location and /dev/shm. Although the swap contains all form elements, while the temp php file (e.g. /dev/shm/phpZJm3V0) contains the actual file that I am uploading. I just recently changed the temp file location in php.ini and previously it was set to /tmp. I was not able to see any php temp files at that location earlier until after I changed the temp file location in php.ini.

Actually I just discovered that the fault, not exactly the fault, but our "upload confirmation" page was set to expire 15 minutes after the upload started, so after changing that value to 3 hours, the upload page finally appears. Therefore, in reality the upload was actually getting completed, but the upload confirmation wasn't showing up. Anyhow, sorry for all this trouble. This issue has now been resolved!