KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I can't find any document describing database connection pooling effect for unicorn . Unicorn forks several worker processes. I configured prefork and it's critical not to share database connections between workers, so I reset db connections after fork. My rails application has 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 that handles 1 request at a time. SQL queries should be blocking. Seems the other 4 connections are useless? Can I set the pool size to 1 for better performance?
Tags (comma-separated)
Save Edits
Cancel