Welcome Guest, Not a member yet? Register   Sign In
Why to ALWAYS create a new DB connection (MySQL case)?
#3

[eluser]kadishmal[/eluser]
[quote author="InsiteFX" date="1329116472"]Maybe because they set a timeout limit for mysql to time out on the servers!

Even your localhost mysql has a timeout limit set to close the database.
[/quote]

That doesn't matter. If connection is closed, the API will reconnect. If that TRUE wasn't passed, the API checks if the connection with identical params is active. If so, return existing connection, otherwise create a new. So, it doesn't matter if the connection was closed as a result of timeout or manually, or due to network failure.

That's why I don't understand why it's forced to create a new connection.

Regarding persistency being "EVIL", I have no comments. That's why pconnection exists and developers need to use it understanding all consequences.


Messages In This Thread
Why to ALWAYS create a new DB connection (MySQL case)? - by El Forum - 02-12-2012, 11:47 PM
Why to ALWAYS create a new DB connection (MySQL case)? - by El Forum - 02-13-2012, 12:01 AM
Why to ALWAYS create a new DB connection (MySQL case)? - by El Forum - 02-13-2012, 01:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB