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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > Standard 2.2.5 + LSAPI + Rails uses up all processes

Reply
 
Thread Tools Display Modes
  #1  
Old 11-26-2006, 11:25 AM
dirkbj dirkbj is offline
Member
 
Join Date: Oct 2006
Posts: 16
Default Standard 2.2.5 + LSAPI + Rails uses up all processes

I saw this bug on earlier versions - 2.2.3 with an LSAPI Ruby module earlier to 1.11. I am still seeing this bug running 2.2.5 with the latest LSAPI Ruby module (1.11)

Here are the details:

1) OS type and Version:

Mac OS X Server 10.4.8

2) LiteSpeed Version:

2.2.5 Standard + LSAPI Ruby Module 1.11

3) If PHP related:

Not PHP related

4) All possible related info that you observed before and after, the bug occurred:

The site handles a Rails application. It runs great for days at a time, but then, for no apparant reason, it spawns a bunch of ruby threads and takes up all system resources. Our fix is to restart the server. We see no general pattern - it seems to occur when the site is busy or when it is sitting idle.

5) If you can reproduce the bug, please detail what the steps are:

Just let it run.

6) Note any errors logged in error.log and stderr.log of LiteSpeed logs directory:

No errors were logged.

7) Check /tmp/lshttpd for "core dumps"/core files:

No core dumps
Reply With Quote
  #2  
Old 11-27-2006, 09:10 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Maybe the ruby processes gets into a state that cannot be killed by normal SIGTERM signal.

Can you "truss" or "ktrace" those ruby processes to check the state of those hanging processes.

It would be best if we can logon to your server to check though ruby processes when it happenes.
Reply With Quote
  #3  
Old 11-27-2006, 09:22 AM
dirkbj dirkbj is offline
Member
 
Join Date: Oct 2006
Posts: 16
Default RE: Standard 2.2.5 + LSAPI + Rails uses up all processes

If this were true, I believe we would see ruby processes building over time. This is not the case. The ruby process count stays generally constant over a period of days and then all-of-a-sudden grows out of control.

I will watch and try to get a trace the next time it happens.

Login access to our server, unfortunately, is not an option.

Dirk
Reply With Quote
  #4  
Old 11-27-2006, 10:33 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Also, please make sure the latest ruby-lsapi has been used. If you have installed it manually, then switch to gem installation, you need to remove the file installed manually.
Reply With Quote
  #5  
Old 11-27-2006, 10:39 AM
dirkbj dirkbj is offline
Member
 
Join Date: Oct 2006
Posts: 16
Default re: Standard 2.2.5 + LSAPI + Rails uses up all processes

Yes, I am and have been running the latest - installed with ruby gems.

Dirk
Reply With Quote
  #6  
Old 11-28-2006, 02:56 PM
admin admin is offline
LiteSpeed Staff
 
Join Date: Apr 2006
Posts: 6
What is your rails settings within litespeed? If you set instances/children value too high and a search crawler/bot comes to hammer your site on a periodic basis, it can send your server resource skyrocketing if the backend cannot support the number of simultaneous script connections.

Since we do not know the exact rail script that's causing this or detailed parameters of the incident, it would be extremely difficult to isolate/replicate on our end right now. Hopefully we can get more answers once we have some trace data if and when this happens again.
Reply With Quote
  #7  
Old 12-01-2006, 08:39 AM
fantasydreaming fantasydreaming is offline
Senior Member
 
Join Date: Sep 2006
Posts: 76
My similar problem to this was caused by a search using the ruby-google module... apparently http-access and http-access2 can both get stuck waiting 'forever' for a google (or anywhere, likely) response.

The solution for me was to wrap it in a Timeout::timeout(5) do() block.
Reply With Quote
  #8  
Old 12-01-2006, 08:52 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
fantasydreaming,

Thank you for sharing your finding with us. It is really helpful.

We may improve the ruby-lsapi implementation to somehow kill those hanging processes when we got a chance.
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 06:37 PM.



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