Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Thin child processes
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
de  
View profile   Translate to Translated (View Original)
 More options Aug 22 2012, 12:02 pm
From: de <jimmie4848john...@gmail.com>
Date: Wed, 22 Aug 2012 09:02:42 -0700 (PDT)
Local: Wed, Aug 22 2012 12:02 pm
Subject: Thin child processes

I have a rails app running Thin. During peak hours holds up pretty well...
but i've noticed child processes or connections persist and slow the
application to almost a crawl. Since we launch, I've had to restart the
application servers frequently. Can someone explain to me what's happening.
I'm putting God in place to monitor this now and I'm using the following to
verify currently:

Bash$ netstat -nap | grep 3000 | wc -l


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marc-André Cournoyer  
View profile  
 More options Aug 22 2012, 12:05 pm
From: Marc-André Cournoyer <macourno...@gmail.com>
Date: Wed, 22 Aug 2012 12:05:50 -0400
Local: Wed, Aug 22 2012 12:05 pm
Subject: Re: Thin child processes

Did you set the timeout option to 0 or something? You can also limite the
number of persistent connections with --max-persistent-conns option.

--
M-A
http://macournoyer.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
de  
View profile   Translate to Translated (View Original)
 More options Aug 22 2012, 12:10 pm
From: de <jimmie4848john...@gmail.com>
Date: Wed, 22 Aug 2012 09:10:48 -0700 (PDT)
Local: Wed, Aug 22 2012 12:10 pm
Subject: Re: Thin child processes

Timeout is set to 30seconds, but just noticed now
max_persistant_connections is set to 512 which is almost precisely where
the app dies. I'm assuming I should lower this. Just soaking up way to much
memory. Here's my config.

---
chdir: /usr/share/nginx/www/foo.com/current
environment: staging
address: 127.0.0.1
port: 3000
timeout: 30
log: log/thin.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 512
require: []
wait: 30
servers: 6
daemonize: false


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marc-André Cournoyer  
View profile  
 More options Aug 22 2012, 1:09 pm
From: Marc-André Cournoyer <macourno...@gmail.com>
Date: Wed, 22 Aug 2012 13:09:12 -0400
Local: Wed, Aug 22 2012 1:09 pm
Subject: Re: Thin child processes

If the connections are not being closed is because there is some activity
on the socket. Are you doing anything special, like real-time updates
inside Rails?

--
M-A
http://macournoyer.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
de  
View profile   Translate to Translated (View Original)
 More options Aug 22 2012, 1:14 pm
From: de <jimmie4848john...@gmail.com>
Date: Wed, 22 Aug 2012 10:14:23 -0700 (PDT)
Local: Wed, Aug 22 2012 1:14 pm
Subject: Re: Thin child processes

No, not at all. The queries are fairly robust, but I'm using Mongo. What
happens if I lower max persisted connections to say, 100? This is wear it
seems to slow down dramatically. ps- the app is stateless, no sessions.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
de  
View profile  
 More options Aug 22 2012, 2:23 pm
From: de <jimmie4848john...@gmail.com>
Date: Wed, 22 Aug 2012 11:23:51 -0700 (PDT)
Local: Wed, Aug 22 2012 2:23 pm
Subject: Re: Thin child processes

I think I just answered my own question.

Thin should kill off any connections over max_persisted_conns, right? So If
i'm seeing persisted connections hover around 512 which it was previously
set too, Thin won't do anything. The application will continually eat
memory. If I lower the limit on max persisted connections, I should be fine
unless I choose to increase the instance size at a later date. Equally, I
could just turn this off by setting this config to 0.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marc-André Cournoyer  
View profile  
 More options Aug 22 2012, 2:30 pm
From: Marc-André Cournoyer <macourno...@gmail.com>
Date: Wed, 22 Aug 2012 14:30:31 -0400
Local: Wed, Aug 22 2012 2:30 pm
Subject: Re: Thin child processes

> Thin should kill off any connections over max_persisted_conns, right?

It won't kill them, but it won't allow them to be persistent and close the
connection right after the response is sent.

Perhaps 512 is a little to high for a default. I think Nginx used 100. I
just updated the code.

--
M-A
http://macournoyer.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
de  
View profile   Translate to Translated (View Original)
 More options Aug 22 2012, 2:59 pm
From: de <jimmie4848john...@gmail.com>
Date: Wed, 22 Aug 2012 11:59:02 -0700 (PDT)
Local: Wed, Aug 22 2012 2:59 pm
Subject: Re: Thin child processes

Nginx default is 1024, which I also had to lower. It's cool, I think I have
enough info to work with. Appreciate the responses.

Cheers.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »