diff php/read/similar.php @ 23:d606320ec331

post-5.7-upgrade efforts to reduce dropped connections, db insertion fails
author Charlie Root
date Sun, 30 Dec 2018 07:00:09 -0500
parents 46382face560
children d9dd9705e724
line wrap: on
line diff
--- a/php/read/similar.php	Sun Dec 30 06:59:13 2018 -0500
+++ b/php/read/similar.php	Sun Dec 30 07:00:09 2018 -0500
@@ -108,17 +108,17 @@
         curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
 	$gotit=0;
 	  $semaphore = new SyncSemaphore("Amazon");
-	  $gotit = $semaphore->lock(4000);
+	  $gotit = $semaphore->lock(1000);
 	  if (!$gotit) {
 	    file_put_contents('/var/ywww/debug/phpDebug',
 			      "Got it: ".(int)$gotit." 4\n",FILE_APPEND);
-	    $gotit = $semaphore->lock(5000);
+	    $gotit = $semaphore->lock(1000);
 	    file_put_contents('/var/ywww/debug/phpDebug',
-		        "Got it: ".(int)$gotit." $requestIP 4a\n",FILE_APPEND);
+		        "Got it: ".(int)$gotit." 4a\n",FILE_APPEND);
 	  }
         $ret = curl_exec($crl);
         curl_close($crl);
-	usleep(1000000);
+	usleep(500000);
 	if ($gotit) {
 	  $semaphore->unlock();
 	}