On Thu, Jan 7, 2010 at 8:31 AM, Iñaki Baz Castillo <[email protected]> wrote:
> Don't set the Sequel instance in the master process, instead do it in each
> worker ("after_fork" block in unicorn config file).

Alternatively, you can set up the Sequel Database in the master
process, and just call Database#disconnect before forking.

> In this way each process has its own Sequel instance with its own threads
> pool.
>
> Also, using Sequel thread pool makes no sense when using Unicorn as each
> worker is single thread, so I gain some performance by setting
> "single_threaded = true" in Sequel database configuration (no thread pool
> stuff).

This is good advice.

Jeremy
_______________________________________________
Unicorn mailing list - [email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

Reply via email to