LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > File upload 503 error after 90 secs

Reply
 
Thread Tools Display Modes
  #1  
Old 10-28-2006, 03:21 PM
ukmattlaw ukmattlaw is offline
New Member
 
Join Date: Apr 2006
Posts: 7
Default 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
Reply With Quote
  #2  
Old 10-28-2006, 03:30 PM
ukmattlaw ukmattlaw is offline
New Member
 
Join Date: Apr 2006
Posts: 7
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...
Reply With Quote
  #3  
Old 10-28-2006, 03:48 PM
ukmattlaw ukmattlaw is offline
New Member
 
Join Date: Apr 2006
Posts: 7
Talking 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.
Reply With Quote
  #4  
Old 10-31-2006, 08:25 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Glad you find the solution yourself.
Reply With Quote
  #5  
Old 03-04-2009, 10:17 AM
ppgengler ppgengler is offline
New Member
 
Join Date: Feb 2009
Posts: 8
Default 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
Reply With Quote
  #6  
Old 03-05-2009, 10:10 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
There are memory limits in php.ini as well, you need to increase it along with post size limit.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:02 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.