Rails: Does every http request creates a new connection pool?

拈花ヽ惹草 提交于 2019-12-10 09:28:51

问题


i am reading this article https://polycrystal.org/posts/2012-05-25-active-record-connection-pool-fairness.html and it states that every http reuest create a new connection pool. is it true??

If it is true then what if a http request creates two threads that needs to access database then will that two threads create two separate connection pool agian or they will use the connection pool created by a http request.

Thanks,


回答1:


Not request, but every worker process. The whole concept of connection pooling is to eliminate the need for establishing a db connection in every request.



来源:https://stackoverflow.com/questions/34251081/rails-does-every-http-request-creates-a-new-connection-pool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!