In my test setup using my own session handlers with session_set_save_handler and mysql, the session handler opens and close mysql connections.
But what if my page also requires some mysql queries? Should I open a new connection or use the already opened one (opened by the session handler)?
I have made it a good practice to close a connection after a query but if I do it with only connection open no session data will be written to my mysql table.
I have seen some scripts using persistent connections but are not sure what would be the best for a real world environment.