Jump to content


Photo

Default Mysql Timeout


  • Please log in to reply
6 replies to this topic

#1 craygo

craygo
  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 20 September 2006 - 05:12 PM

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

#2 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 20 September 2006 - 05:15 PM

1. This is a PHP forum so why are you asking for help with perl?
2. MySQL help is in the MySQL forum.


#3 craygo

craygo
  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 20 September 2006 - 05:17 PM

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

#4 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 20 September 2006 - 05:22 PM

Yeah well. These user privileges may be your problem:
Posted Image

#5 craygo

craygo
  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 20 September 2006 - 05:25 PM

I have no access to these. My database is being hosted.

#6 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 20 September 2006 - 05:44 PM

Try to ask your host if what the resource limits are set to on your MySQL user.

#7 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 21 September 2006 - 12:38 AM

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.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users