Menu

mysql_real_connect() function call hangs

Help
deepa balu
2009-02-11
2013-04-17
  • deepa balu

    deepa balu - 2009-02-11

    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..

     
    • Ben Goodwin

      Ben Goodwin - 2009-02-13

      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.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.