Code

Added timeout to GOsa::log mysql connections.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Aug 2009 07:12:08 +0000 (07:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Aug 2009 07:12:08 +0000 (07:12 +0000)
-While the server wasn't reachable, we had logins > 60seconds due to timeout reasons.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14110 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_log.inc

index 4b846e5722e26f1811178f9ba6aac370a5a51eb7..fbdbb371c72b953e34a4b1dd78325e6fdb5c4c86 100644 (file)
@@ -159,6 +159,7 @@ class log {
    
       /* Connect to the database 
        */
+      ini_set("mysql.connect_timeout",5);
       $con = @mysql_pconnect($server_name,$server['USER'],$server['PWD']);
       if(!$con){
         $error = msgPool::dbconnect(_("MySQL logging"),mysql_error());