Unexpected 503 Errors after ~1 day of uptime

#1
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?
 

mistwang

LiteSpeed Staff
#2
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.
 
#3
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?
 

mistwang

LiteSpeed Staff
#5
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.
 
Top