List:General Discussion« Previous MessageNext Message »
From:Jose de Leon Date:December 8 1999 8:50pm
Subject:Please expalin connect timeout option
View as plain text  
What is the meaning of the MYSQL_OPT_CONNECT_TIMOUT option described in the
online manual in section

Is this a timeout in seconds that mysql_connect will wait while trying to
establish a connection with the server?  Or is this the timeout in seconds
for the life of the existing connection?  Does this mean if there is no
activity on the connection for the timeout period (selects, inserts, etc.)
then the connection will close?  What happens if a query is attempted after
the timeout has caused the connection to close?  Will the error code
indicate a timeout, can the connection be restablished safely without
calling mysql_init?

It appears that mysql_ping() can be used to test a connection and cause a
reconnect if it is not active.  What is the overhead involved in calling
mysql_ping() versus mysql_connect()?  For example, I may want to call
mysql_ping periodically to ensure the connection remains active provided it
has better overhead than mysql_connect().


Please expalin connect timeout optionJose de Leon8 Dec
  • Re: Please expalin connect timeout optionsinisa9 Dec