# Lightly used mongrel process - mysql connection

**URL:** <https://www.ruby-forum.com/t/lightly-used-mongrel-process-mysql-connection/163347>\
**Category:** Rails\
**Created:** [March 19, 2009, 2:15pm UTC](https://www.ruby-forum.com/t/lightly-used-mongrel-process-mysql-connection/163347 "2009-03-19T14:15:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ea5d25/32.png) [@alberto](https://www.ruby-forum.com/u/alberto)\
**Post date:** [March 19, 2009, 2:15pm UTC](https://www.ruby-forum.com/t/lightly-used-mongrel-process-mysql-connection/163347/1 "2009-03-19T14:15:23Z")

</div>

I noticed that in one of my apps that are lightly used, we had a  
background process that would only contact the DB if some condition  
was met. If not, it would not contact the DB. It could go for days  
without establishing a connection to the DB. And then, when it was  
finally time, the process would blow up because I would get a  
connection timed out error. I understand this now, and have  
reconfigured the background process.

That lead me to think of some issues we have seen with lightly used  
apps and the mongrel processes we have. If the app is rarely hit, and  
let’s say I have three mongrels setup, it is conceivable that at least  
one of those processes could go for a long time before contacting the  
DB.

Does that time out? Or does Mongrel have some keep alive built in  
already?

Thanks.
