craygo Posted September 20, 2006 Share Posted September 20, 2006 Can anyone tell me what the default connection timeout is.Let me give you a scenerio as to why I am asking.I have a perl script which connects to a remote MySQL database. When the scrprt crashes, does the connection get severed?? And if it does not, how long will mysql wait before it disconnects?Reason I ask is our host said we were getting too many connection to the mysql box and I was wondering why. I have a program which restart the script when it crashes. So the only thing I could think of, is the connection was remaining when the script would crash and it made a new one when it was restarted. So I want to give a delay to the program to restart if it crashes outside the timeout value.ThanksRay Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted September 20, 2006 Share Posted September 20, 2006 1. This is a PHP forum so why are you asking for help with perl?2. MySQL help is in the MySQL forum. Quote Link to comment Share on other sites More sharing options...
craygo Posted September 20, 2006 Author Share Posted September 20, 2006 I gave the perl example cause that was the best I had. And I figured most of the GURU's here know about mysql since this is a php and mysql forum.Ray Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted September 20, 2006 Share Posted September 20, 2006 Yeah well. These user privileges may be your problem:[URL=http://img204.imageshack.us/my.php?image=screenshot12hs2.png][IMG]http://img204.imageshack.us/img204/4043/screenshot12hs2.th.png[/img][/URL] Quote Link to comment Share on other sites More sharing options...
craygo Posted September 20, 2006 Author Share Posted September 20, 2006 I have no access to these. My database is being hosted. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted September 20, 2006 Share Posted September 20, 2006 Try to ask your host if what the resource limits are set to on your MySQL user. Quote Link to comment Share on other sites More sharing options...
fenway Posted September 21, 2006 Share Posted September 21, 2006 In principle, you lose your DB handle in perl when your script terminates properly. Even if it hangs, there is a DB connection timeout, when can't be more than a few minutse. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.