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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > killed with SIGTERM, 3-4 times a day

Reply
 
Thread Tools Display Modes
  #1  
Old 02-09-2008, 11:21 AM
fantasydreaming fantasydreaming is offline
Senior Member
 
Join Date: Sep 2006
Posts: 76
Default killed with SIGTERM, 3-4 times a day

Lsws seems to be sending a sigterm to my processes during processing occassionally.

I'm using 3.3.4. I believe the latest lsapi as well.

My backtraces show it happens sometimes during a template render, sometimes during a memcached call, and sometimes during a database requests. None of these things should take very long, so it just seems to be random.

Load has been very low, under 0.4.

Any ideas for debugging? I haven't gotten any complaints from people (besides the occassional "it logged me out" complaint, which I'm still trying to figure out, perhaps some cookie problem).

Thanks for a great product!
Reply With Quote
  #2  
Old 02-11-2008, 07:49 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,586
Have you set "Max Idle time" under Ruby Rails tab?

http://www.litespeedtech.com/docs/we...extMaxIdleTime
Reply With Quote
  #3  
Old 02-15-2008, 12:51 PM
fantasydreaming fantasydreaming is offline
Senior Member
 
Join Date: Sep 2006
Posts: 76
Yes, but the backtrace and logged sigterm exceptions are showing that this is happening while the request is in procesing, and that it was a very fast request (i.e. it hasn't hung, from what I can tell). So it shouldn't be considered 'idle' since it was just given a new request 10ms previously...
Reply With Quote
  #4  
Old 02-15-2008, 01:34 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,586
OK, we will investigate. Maybe the watchdog ruby process think the child process is idle while it is not.
Reply With Quote
  #5  
Old 02-15-2008, 02:22 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,586
Please try adding the following environment variables under ruby tab

LSAPI_MAX_PROCESS_TIME=10000000
LSAPI_AVOID_FORK=1
LSAPI_MAX_IDLE=1000000

If those variable helps, try removing them one by one and find out which one affect this problem. Which this hint, we can locate the problem and fix it accordingly.
Reply With Quote
  #6  
Old 02-20-2008, 10:53 AM
iwarshak iwarshak is offline
Member
 
Join Date: Jan 2008
Posts: 12
I am having the exact same issue. Processes getting SIGTERMed on a very fast page. Did you have any luck with this?
Reply With Quote
  #7  
Old 02-20-2008, 02:34 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,586
Please try above environment variables, see if it helps.
Also, please check the PID of "ruby" processes, see if the killed process is a child process. On a busy server, there should be a parent ruby process keep running.
At least, we can narrow down which process send the SIGTERM signal, lshttpd, or the parent ruby process.
Reply With Quote
  #8  
Old 02-20-2008, 02:46 PM
iwarshak iwarshak is offline
Member
 
Join Date: Jan 2008
Posts: 12
I will try that.

I also see quite a few of these:

[idle] connection to [uds://tmp/lshttpd/mydomain.com:_.sock] on request #81, error: Connection reset by peer!

Could this be related to the above problem?
Reply With Quote
  #9  
Old 02-25-2008, 06:15 AM
pbengtson pbengtson is offline
New Member
 
Join Date: Feb 2008
Posts: 6
Specifying all three options:

LSAPI_MAX_PROCESS_TIME=10000000
LSAPI_AVOID_FORK=1
LSAPI_MAX_IDLE=1000000

makes our server crash, hard, after a while (server starts swapping then goes firmly into a downward spiral). Removing LSAPI_AVOID_FORK=1, keeping only the LSAPI_MAX_PROCESS_TIME and LSAPI_MAX_IDLE alleviates the problem for us - only a tenth of the requests result in SIGTERMs - but it doesn't remove it. Which is unacceptable; management is already talking about switching to another webserver. And we have a purchased license.

Please advise.
Reply With Quote
  #10  
Old 02-25-2008, 07:46 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,586
We are working on a new ruby lsapi release to address this.
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 11:14 AM.



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