I was wondering whether the database connection gets closed after the request is completed in symfony 2 application. Does symfony 2 handles the closing of database connection by calling close function of doctrine or symfony does not deal with the closing at all. I have walked over many tutorials of symfony 2 but never found that they manually close the database connection. So should I have to manually close the database connection after the request is completed ? I also found out that doctrine uses persistent connection. Does that mean i dont have to worry about closing database connection. How does doctrine 2 handle the closing operation ? If I have large number of requests, I will be left with many open connections.Could somebody explain to me for the case when there could be many concurrent users logging into my site ?
I was wondering whether the database connection gets closed after the request is completed
Share
PHP will take care of closing your connections after each request. No need to worry about it. And Doctrine 2 does not use persistent connections.