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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > Unexpected 503 Errors after ~1 day of uptime

Reply
 
Thread Tools Display Modes
  #1  
Old 10-16-2006, 04:21 PM
ajstewart ajstewart is offline
New Member
 
Join Date: Oct 2006
Posts: 3
Default Unexpected 503 Errors after ~1 day of uptime

Hi guys,

I recently deployed a RoR-powered questionnaire on LiteSpeed 2.2.1 standard and Mac OS X Server 10.4.7 and have been experiencing periodic (every day or so of uptime) 503 Errors despite very light site traffic.
When I first encountered this problem my max connections setting for Rails apps was 10 and I had a 60 sec. initial timeout so I bumped these to 30 and 120 sec. respectively. However, again after 1 day of uptime with light traffic the site began serving 503s. The Rails app was stilling running when I check in the web admin. Performing a 'graceful restart' allowed the web server to return to normal functioning.

stderr.log is filled with:
/opt/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.7.0/lsapi.bundle: warning: already initialized constant ENV

and

fork() failed, please increase process limit: Resource temporarily unavailable

All that appears in the error log are 'file not found' entries for a folder that does not, in fact, exist (must be a configuration issue):
2006-10-16 14:55:24.550 [INFO] [17.254.17.75:57973-0#MyApp] File not found [/Library/WebServer/RailsDocuments/MyApp/public/run/]

The access log for the Rails app itself indicates nothing abnormal.

I did notice this line in the changelog for 2.2.2:
Fixed: Registered "env_copy" as a ruby global variable to prevent it from being garbage collected resulting in possible 503 error.

Could this be related to the issue I'm experiencing?
Reply With Quote
  #2  
Old 10-16-2006, 04:59 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Quote:
fork() failed, please increase process limit: Resource temporarily unavailable
I think 503 is the result of this error message. all the others are normal.

Make sure you ruby-lsapi installation is up-to-date.
Double check "Process soft/hard limit" under both "security" and "Rails" tab, those should be set high enough, I think the fork() failures are caused by this.
Reply With Quote
  #3  
Old 10-16-2006, 05:18 PM
ajstewart ajstewart is offline
New Member
 
Join Date: Oct 2006
Posts: 3
Default Mac OS X default user process limit

The default user process limit for Mac OS X is 100 (I believe). I see that the soft and hard limits for processes under the security tab are set to 400 and 450 respectively. Should LS be routinely forking off that many processes when the server load is light?
Reply With Quote
  #4  
Old 10-16-2006, 05:27 PM
ajstewart ajstewart is offline
New Member
 
Join Date: Oct 2006
Posts: 3
Default actually, sounds like I have the same issue as this fellow

My problem sounds just like this fellow's:
http://www.litespeedtech.com/support...read.php?t=581

I suppose I'll try updating my LSAPI. Thanks for the tips.
Reply With Quote
  #5  
Old 10-16-2006, 05:33 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Quote:
Should LS be routinely forking off that many processes when the server load is light?
No, ruby-lsapi does not. when you count number of processes, all processes running under that user should be included.
Please check the number of processes running under the same user when 503 happens.
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 03:46 PM.



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