]> git.mxchange.org Git - friendica.git/commitdiff
Changed timeout, logging added
authorMichael <heluecht@pirati.ca>
Tue, 13 Jun 2017 09:03:19 +0000 (09:03 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 13 Jun 2017 09:03:19 +0000 (09:03 +0000)
include/dba.php
include/poller.php

index 3e62da892f665762372340a54501be9a74522ad3..d310ad04cc0bcf50ae266b0652d28fa60f2f5c42 100644 (file)
@@ -675,8 +675,8 @@ class dba {
 
                $args = func_get_args();
 
-               // In a case of a deadlock we are repeating the query 10 times
-               $timeout = 10;
+               // In a case of a deadlock we are repeating the query 20 times
+               $timeout = 20;
 
                do {
                        $stmt = call_user_func_array('self::p', $args);
index e0b83dd73c48d6f285273871c64e94618396329c..0c92d00875f865248882e5d274a179e23db1645c 100644 (file)
@@ -649,11 +649,15 @@ function find_worker_processes() {
  */
 function poller_worker_process() {
 
+       $stamp = (float)microtime(true);
+
        $timeout = 10;
        do {
                $found = find_worker_processes();
        } while (!$found && (poller_total_entries() > 0) && (--$timeout > 0));
 
+       logger('Duration: '.number_format(microtime(true) - $stamp, 3), LOGGER_DEBUG);
+
        if ($found) {
                $r = q("SELECT * FROM `workerqueue` WHERE `pid` = %d", intval(getmypid()));
        }