I cannot find any document describing the effect of pooling a database for unicorn .
A unicorn deploys several workflows. I configured prefork and is not critical so as not to use communication between workers, so I reset the db connections after fork.
In my rails application there are 8 workers per server, and the pool size in database.yml is 5, then I saw 45 connections to mysql.
Each worker is single-threaded, which processes 1 request at a time. SQL queries should be blocked. Does the other 4 connections seem to be useless? Can I set the pool size to 1 for better performance?
luikore
source share