I have 4 server setup where i am using libnss for authentication.
My Mysql server machine nfs goes down, so mysql hangs.
Now i am not able to login to any of the other 3 servers bcos the api call mysql_real_connect() hangs .
Is there any way i can set up a timeout when eshtablishing a connecction?
The api call should disconnect automatically after 5 seconds ..
something like that..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You'll want to set an appropriate connect timeout option in your system's my.cnf file. I don't recall the exact syntax offhand but I'm sure it's a well-documented MySQL configuration option.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have 4 server setup where i am using libnss for authentication.
My Mysql server machine nfs goes down, so mysql hangs.
Now i am not able to login to any of the other 3 servers bcos the api call mysql_real_connect() hangs .
Is there any way i can set up a timeout when eshtablishing a connecction?
The api call should disconnect automatically after 5 seconds ..
something like that..
You'll want to set an appropriate connect timeout option in your system's my.cnf file. I don't recall the exact syntax offhand but I'm sure it's a well-documented MySQL configuration option.