cyrus processes & maxchild

Maria McKinley maria at shadlen.org
Wed May 12 23:26:43 EDT 2010


Andrew Morgan wrote:
> On Wed, 12 May 2010, Maria McKinley wrote:
> 
>> Hi there,
>>
>> I have a problem with my mail program hanging when too many processes 
>> are spawned by cyrus. The problem seems to occur when the maxchild 
>> limit is reached. I was wondering what is suppose to happen when the 
>> maxchild limit is reached, because at this point, I have to restart 
>> cyrus when this happens. What would happen if I removed the maxchild 
>> limit entirely?
> 
> The Maxchild limit is there to protect your servers from overloading if 
> you have misbehaving clients or abusive users.  If your server can 
> handle a higher setting, feel free to increase the value.  You may need 
> to increase the ulimits on your cyrus process as well.
> 
> My Cyrus servers set the following in the /etc/init.d/cyrus script:
> 
> # Crank up the limits
> ulimit -n 209702
> ulimit -u 4096
> ulimit -c 102400
> 
> and I have the following service entries in /etc/cyrus.conf:
> 
>   imap  cmd="/usr/local/cyrus/bin/imapd" listen="imap" prefork=10 
> maxchild=2000
>   imaps cmd="/usr/local/cyrus/bin/imapd -s" listen="imaps" prefork=10 
> maxchild=1500
> 
> This is a VMWare guest with 4 vcpus and 6GB of RAM.
> 
> If you remove the Maxchild setting entirely, eventually your Cyrus 
> process will run into the process limits (ulimits) anyways, and may fail 
> in exciting ways.  It's better to let Cyrus limit itself.
> 
>     Andy

Good info, thanks Andy, I will probably up the limits. Still curious 
about what is suppose to happen when the limit is reached, however. As 
users, what we notice is that some people that are already logged on, 
can continue to use email, but no one new can log on. I'm sure not all 
of the "running" processes at this point are active, so I would expect 
cyrus to start shutting down sleeping processes, but that doesn't seem 
to happen. Is it really the mode that cyrus will just stop starting new 
processes, until someone with root power notices and restarts Cyrus? Is 
there a way to at least send out a notification this is happening? 
Usually I am one of the people always logged on, so don't notice until 
someone else lets me know...

Oh, also how are the ulimits different from the maxchild limits?

thanks a bunch,
maria


More information about the Info-cyrus mailing list