Jump to content

Archived

This topic is now archived and is closed to further replies.

craygo

Default Mysql Timeout

Recommended Posts

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.

Thanks

Ray

Share this post


Link to post
Share on other sites
1. This is a PHP forum so why are you asking for help with perl?
2. MySQL help is in the MySQL forum.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
I have no access to these. My database is being hosted.

Share this post


Link to post
Share on other sites
Try to ask your host if what the resource limits are set to on your MySQL user.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.