Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
* leakage of sockets or  activerecord connections
@ 2013-08-22 22:13 Corin Langosch
       [not found] ` <52168D10.8080407-FIgL9nsKG9THeUWFKdsAYQC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Corin Langosch @ 2013-08-22 22:13 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

Hi,

I'm using rainbows to power my own small middleware. I doen't use rails (or any 
other framework), only activerecord for database access. I chose 
XEpollThreadSpawn, set worker_processes 1 and worker_connections 25. All classes 
are eager loaded, no reloading of anything while the server is running. AR 
connection pool size is set to 100.

Now it seems that every request opens a new connection and never frees/ closes 
it. So after 100 requests I get an AR connection pool exception. I also see 
exactly 100 postgresql clients connected. When I kill the server all clients get 
disconnected.

I wonder if I have to setup and hooks (like in unicorn before_fork etc.)? In 
fact I'd expect this happens automatically as the thread exits after the request 
is completed?

Thanks,
Corin

_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-27 12:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-22 22:13 leakage of sockets or activerecord connections Corin Langosch
     [not found] ` <52168D10.8080407-FIgL9nsKG9THeUWFKdsAYQC/G2K4zDHf@public.gmane.org>
2013-08-22 22:45   ` Eric Wong
2013-08-22 22:46   ` Lin Jen-Shin (godfat)
     [not found]     ` <CAA2_N1soVYiNkRgZqa+mLO26KUzvTAXuk0gA9Qo7MPrZ0+bNXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-08-27 12:31       ` Corin Langosch

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/rainbows.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).