]> granicus.if.org Git - php/commitdiff
- ensure request_terminate_timeout >= request_slowlog_timeout
authorJérôme Loyet <fat@php.net>
Sun, 9 Oct 2011 15:21:06 +0000 (15:21 +0000)
committerJérôme Loyet <fat@php.net>
Sun, 9 Oct 2011 15:21:06 +0000 (15:21 +0000)
sapi/fpm/fpm/fpm_conf.c

index 3c7a73a8bffde7252fb5d6452ab81c83bc2c2227..5ad7c96dd21b017883f2a41088af15bea65e8b06 100644 (file)
@@ -918,6 +918,11 @@ static int fpm_conf_process_all_pools() /* {{{ */
                        }
 
                        fpm_globals.heartbeat = fpm_globals.heartbeat ? MIN(fpm_globals.heartbeat, (wp->config->request_slowlog_timeout * 1000) / 3) : (wp->config->request_slowlog_timeout * 1000) / 3;
+
+                       if (wp->config->request_terminate_timeout && wp->config->request_slowlog_timeout > wp->config->request_terminate_timeout) {
+                               zlog(ZLOG_ERROR, "[pool %s] 'request_slowlog_timeout' (%d) can't be greater than 'request_terminate_timeout' (%d)", wp->config->name, wp->config->request_slowlog_timeout, wp->config->request_terminate_timeout);
+                               return -1;
+                       }
                }
 
                /* chroot */