Large PHP Uploads Stall/Fail

#21
litespeed restarting frequently is not normal -- usually it doesn't. it should relate to large file upload. let's work together to resolve this issue.

4.1RC4 just updated --- please do a "Force Reinstall".

to watch
1.do't restart frequently, or have some improvements

2.even restart, upload will complete without break.
I did a Force Reinstall of 4.1RC4 and while it did stay up longer, it still restarted. It had a uptime of about 1 hour 55 minutes before it did a restart this time. I'm trying to upload a large file and see if it breaks right now. I will update once its finished.
 
#22
Just an update. I was able to upload a 850 MB file with no problem just now using 4.1RC4 and I think litespeed did restart close to the end of the upload.

I'm going to try with a 1.5 GB file and see how it goes.

Thank you for all your help so far.
 

mistwang

LiteSpeed Staff
#23
Letting you know I tried 4.1RC5 again with no mod_security and it caused the same problem. Totally messed up mod_rewrite so none of my pages would load.

I installed 4.1RC4 and that worked great. I'm running that right now and I will let you know if it continues to restart.
Can you give us details about your mod_rewrite rules. We will try to reproduce and fix the problem with 4.1RC5. 4.1 release will be based off 4.1RC5, need to address it before the official release.
 
#24
Can you give us details about your mod_rewrite rules. We will try to reproduce and fix the problem with 4.1RC5. 4.1 release will be based off 4.1RC5, need to address it before the official release.
I sent you a PM with my mod_rewrite rules. Not sure if you need anything else.

Also I would like to add, that I can't upload any files larger then 1GB in size. When I select them and start the upload, the uploader just sits doing nothing. Any idea why this would happen?
 

mistwang

LiteSpeed Staff
#25
I sent you a PM with my mod_rewrite rules. Not sure if you need anything else.
That's in document root .htaccess, right?
Better sending us a the whole .htaccess file, if there is .htaccess in parent directory, send us that as well.
It also may be related to mod_security rules if used. send us a copy of your mod_security rule.
Last, we need the URL that should be rewritten but broken under 4.1RC5.
If there is anything that may help replicating your problem in our lab, please also let us know.
You can send those information to bug@litespeed...

Also I would like to add, that I can't upload any files larger then 1GB in size. When I select them and start the upload, the uploader just sits doing nothing. Any idea why this would happen?
Right now, LiteSpeed has hard limit of 1GB for HTTP request body, we will bump it up to around 2GB.
 

GOT

Well-Known Member
#26
I have checked the settings in this thread and others referenced. However, I am pretty new to Lightspeed and I'm not even sure I am looking in all the right places.

I have a very basic upload script here:

http://www.x x x x.com/uploadtest/

The php code is simply:

Code:
<?php
$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
else {
echo "Sorry, there was a problem uploading your file.";
}
?>
Very small files (a few K) upload fine. a 2 MB file (which should upload pretty quickly) causes the page to hang for a few minutes and then says something about the connection being terminated.

I would really appreciate someone pointing me very specifically where I should look on this.
 
Last edited by a moderator:

GOT

Well-Known Member
#28
We can't compile 5.3.x as it breaks our site and we are live on it now.

phpinfo page is here

http://www.x x x.com/phpinfo.php

upload_max is set to 550 MB. I'm pretty sure the php.ini is all set right for this. I'm assuming its a lightspeed setting(s) that I am missing.
 
Last edited by a moderator:
#31
is mod_security installed? maybe some mod_security rules blocks upload/

for test, change
$target = "upload/";
to something else, like "abc", see if any difference.

If still problem, please PM the access info of the server.
 
#34
tested, upload a 27M file and was successful.

no control panel in this server, vhost is native lsws vhost.

at first I noticed
vhost: xxx->External App->$VH_NAME_lsphp has problem:
Max Connections:5
Environment:Not Set
Instances:500

changed back to default server level lsphp5, then testing upload, no problem.
the server has 24G memory. 'top -c' shows a lot of
lsphp5:w/vhosts/domain.com/httpdocs/modules.php
consumed CPU most.
so I tuned default external app: lsphp5, change max connections from 35 to 100. i.e.,
Max Connections:100 (from 35)
Environment:
PHP_LSAPI_MAX_REQUESTS=500 (no change)
PHP_LSAPI_CHILDREN=100 (from 35)

another important change:
...../domain.com/httpdocs/includes>chown -R nobody:nobody cache
this is because lsphp5 running as nobody, so cache folder should be owned by nobody as well.

after above 3 changes, as far as I noticed, the website has become quite fast.

here's the problem reported by user:
"Once we hit 4000 online it starts to get very slow"

Let's watch what's going on after above changes.

the lsws version is 4.1
 
#35
Uploads Problem Switch Litespeed

I'm having a problem with PHP uploads and FTP server uploads. For some reason I can't upload files greater then about 20 MB.

Litespeed Version - 4.1.12

- body size limit is 1G

- max_file_size etc. changing max value.

- i have try to diffrent methods upload file -> swf upload, browser upload, ftp server upload. swf upload and browser upload not working, ftp server upload is working but every 20 sec restart connection

Could not write to transfer socket: ECONNABORTED - Connection aborted
226-Error during read from data connection
226 Transfer aborted

I switch apache server and everything working fine.


Does anyone have any settings or ideas for me to try?

Thanks
 
Top