LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Ruby/Rails (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=20)
-   -   File upload 503 error after 90 secs (http://www.litespeedtech.com/support/forum/showthread.php?t=713)

ukmattlaw 10-28-2006 03:21 PM

File upload 503 error after 90 secs
 
Hi folks,

I have set up a rails app as per the latest instructions. Everything is fine and very, very fast :-)

However, when I upload a file I get a 503 error after around 90 seconds. I tested the application on a local machine with files up to 8MB and had no problems. I also tried running the same upload on the live machine with webrick and the upload completes even though it takes much longer than 90 seconds.

Can someone please help me find the problem and fix it? - I am out of ideas :-(

I am using lsws 2.2.4 standard, if that helps.

Thanks in advance,

Matt

ukmattlaw 10-28-2006 03:30 PM

I know it's not good form to reply to my own post, but:

After a 'tail -f' on stderr.log during the upload I get this just before the 503 error is returned:

[FATAL] failed to allocate memory
[FATAL] failed to allocate memory
[FATAL] failed to allocate memory

Funny thing is that there is a lot of free memory on the machine. The file is being uploaded into a mysql longblob field but since it works OK in webrick on the same machine I doubt that is the issue...

ukmattlaw 10-28-2006 03:48 PM

File upload 503 error after 90 secs - Solved!
 
Setting both "Memory Soft Limit (bytes)" and "Memory Hard Limit (bytes)" in "Server > Security > CGI Resource Control" to 200M seems to have fixed it. I will reduce them to a lower level if possible to make me feel a little more at ease.

Hopefully this will be useful to someone else.

mistwang 10-31-2006 08:25 PM

Glad you find the solution yourself. :)

ppgengler 03-04-2009 10:17 AM

Similiar problem
 
Hi,

I've been having a similar problem and I can get around it for some files by increasing those limits, but eventually I hit a limit again and can't get around it. The solution of changing those doesn't seem very scalable, nor reasonably; for me I have them set to 512MB and it can't upload a 13MB file into a DB blob (Postgre SQL for me). What's the root cause of this and how can it be made to not take so much memory?

Thanks,
\Peter

mistwang 03-05-2009 10:10 AM

There are memory limits in php.ini as well, you need to increase it along with post size limit.


All times are GMT -7. The time now is 07:33 AM.