From 03c9e2233447ea7cf9fbf823e92d3ac1bf07cb7f Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 25 Sep 2017 19:33:41 +0000 Subject: [PATCH] Poller: A limit of 1 seems to be better --- doc/htconfig.md | 2 +- include/poller.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/htconfig.md b/doc/htconfig.md index 65417e302..d3d4dad6e 100644 --- a/doc/htconfig.md +++ b/doc/htconfig.md @@ -71,7 +71,7 @@ Example: To set the directory value please add this line to your .htconfig.php: * **paranoia** (Boolean) - Log out users if their IP address changed. * **permit_crawling** (Boolean) - Restricts the search for not logged in users to one search per minute. * **worker_debug** (Boolean) - If enabled, it prints out the number of running processes split by priority. -* **worker_fetch_limit** - Number of worker tasks that are fetched in a single query. Default is 5. +* **worker_fetch_limit** - Number of worker tasks that are fetched in a single query. Default is 1. * **profiler** (Boolean) - Enable internal timings to help optimize code. Needed for "rendertime" addon. Default is false. * **free_crawls** - Number of "free" searches when "permit_crawling" is activated (Default value is 10) * **crawl_permit_period** - Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated (Default value is 60) diff --git a/include/poller.php b/include/poller.php index d43257fc9..aa8763af3 100644 --- a/include/poller.php +++ b/include/poller.php @@ -690,7 +690,7 @@ function find_worker_processes(&$passing_slow) { // The higher the number of parallel workers, the more we prefetch to prevent concurring access // We decrease the limit with the number of entries left in the queue $worker_queues = Config::get("system", "worker_queues", 4); - $queue_length = Config::get('system', 'worker_fetch_limit', $worker_queues); + $queue_length = Config::get('system', 'worker_fetch_limit', 1); $lower_job_limit = $worker_queues * $queue_length * 2; $jobs = poller_total_entries();