Bug #59423 [Com]: GearmanWorker::wait and GearmanWorker::work are spamming the log with warnings.
| From: | phpnet at krogon dot net | Date: | Sat, 12 Nov 2011 19:37:08 +0000 |
| Subject: | Bug #59423 [Com]: GearmanWorker::wait and GearmanWorker::work are spamming the log with warnings. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165092@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=59423&edit=1
ID: 59423
Comment by: phpnet at krogon dot net
Reported by: jhalickman at etsy dot com
Summary: GearmanWorker::wait and GearmanWorker::work are
spamming the log with warnings.
Status: Closed
Type: Bug
Package: gearman
Operating System: CentOS
PHP Version: 5.2.9
Assigned To: hradtke
Block user comment: N
Private report: N
New Comment:
Hello, is there any new release date with changes from svn?
Previous Comments:
------------------------------------------------------------------------
[2011-09-27 10:38:31] hradtke@php.net
I need to make a change to the configuration and then cut a release. I will make it happen sometime
this week.
------------------------------------------------------------------------
[2011-09-27 00:38:50] eric at linkup dot com
The code in SVN is working great for us. Any chance a 0.8.1 release that would include it?
------------------------------------------------------------------------
[2011-08-16 10:37:31] hradtke@php.net
This bug has been fixed in SVN.
In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.
In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.
------------------------------------------------------------------------
[2011-08-15 13:45:51] andy at andy-burton dot co dot uk
The GearmanWorker::work(): gearman_con_wait:timeout error is thrown up for me when any of the worker
servers added are taken offline. The PHP worker process then crashes.
The effect of this for me is that when a single worker server goes offline the entire set of gearman
worker processes timeout and exit, taking the whole thing down.
Is there a fix for this? I'm using ubuntu, php 5.3, gearman-0.8.0 under pecl (latest release)
------------------------------------------------------------------------
[2011-08-09 21:31:52] jameswfraser at gmail dot com
In gearman-0.8.0, the work function has a second if block,
which checks the response and returns false without the
logging, but the wait function does not.
I have modified jhalickman's patch to correct this.
--- gearman-0.8.0/php_gearman.c 2011-05-17
22:51:44.000000000 +0930
+++ gearman-0.8.0-fixed/php_gearman.c 2011-08-10
10:36:38.163397253 +0930
@@ -3303,12 +3303,17 @@
obj->ret= gearman_worker_wait(&(obj->worker));
- if (! PHP_GEARMAN_CLIENT_RET_OK(obj->ret)) {
+ if (! PHP_GEARMAN_CLIENT_RET_OK(obj->ret) &&
+ obj->ret != GEARMAN_TIMEOUT) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"%s",
gearman_worker_error(&(obj-
>worker)));
RETURN_FALSE;
}
+ if (! PHP_GEARMAN_CLIENT_RET_OK(obj->ret)) {
+ RETURN_FALSE;
+ }
+
RETURN_TRUE;
}
@@ -3554,7 +3559,8 @@
obj->ret= gearman_worker_work(&(obj->worker));
if (obj->ret != GEARMAN_SUCCESS && obj->ret !=
GEARMAN_IO_WAIT &&
- obj->ret != GEARMAN_WORK_FAIL) {
+ obj->ret != GEARMAN_WORK_FAIL && obj->ret !=
GEARMAN_TIMEOUT &&
+ obj->ret != GEARMAN_NO_JOBS) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"%s",
gearman_worker_error(&(obj->worker)));
RETURN_FALSE;
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=59423
--
Edit this bug report at https://bugs.php.net/bug.php?id=59423&edit=1