MySQL Forums
Forum List  »  General

query timeout
Posted by: Igor Loboda
Date: April 06, 2005 10:37AM

Hi,

I'm running mysql 4.0.15 under Solaris. My client application uses mysql_query c function. If the server is really busy mysql_query does not come back for a while. I need to make sure no call to mysql_query takes more then some limit, no matter if it failes or succeedes. I just need it to fail gracefuly rather than hang forever. I suspect server timeout settings is not what I need. Settings which control the way a client handles it's connection to server is what could help me. I can see these options MYSQL_OPT_READ_TIMEOUT and MYSQL_OPT_WRITE_TIMEOUT were added in 4.1.1 but only for Windows. They sound like what I need. The problem is my application runs under Solaris and Linux as well as under Windows, and our current version is 4.0.15 (can upgrade though). Here is the questions:

1. Any ideas how to do this using mysql itself or is it not possible yet? (I'm considering alert signal and having dedicated thread but want cleaner solution)
2. Are MYSQL_OPT_READ_TIMEOUT/WRITE options going to be available on other platforms than windows? When?

Thanks for any help
Igor

Options: ReplyQuote


Subject
Written By
Posted
query timeout
April 06, 2005 10:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.