-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP GearmanClient::doBackground just hangs #241
Comments
Are you starting gearmand with Also, maybe try to reproduce the issue without using PHP. The issue might not be with gearmand. Are you sure your workers always send WORK_COMPLETE? See issue #161. Are you doing anything with signals or alarms in PHP? If so, see issue #230. |
Thank you for you reply!
I dont think that gearman server does something to incoming request! and hangs. I think that php_gearman library hangs, I guess there is a bug. Tailing log file of gearman server I see actions and DEBUG MESSAGES of incoming request and when it hangs I dont see anything, any errors and so on. |
I would try. First step of debugging is to isolate the issue.
Did I say the workers should send WORK_COMPLETE without being started? No. That’s not even possible, I think. But, just to clarify, none of your workers send exceptions, right?
Well, if that’s the case, then, depending on the version of PHP, there are two other GitHub repos for php_gearman where you should open the issue.
Does gearmand still respond to requests from other clients when this happens? |
Excellent remarks, thanks.
No need to try, solved, solution will provide below
No, no exceptions, no error messages, none. It seemed that request was not delivered to gearmand
I would do it, thx
Yeah, it did So my solution (Nothing to do with Gearmand or php extensions): Intro We use Yii1, and I cloned repo gearman wrapper - what is known component to Yii world In config file I have
Ocassionally, I tried to start my loop with bare calls without component, wrapper #first example, and it worked. So forwarded further and found that
does not work, hovewer it should! Maybe foreach loop is buggy here, I cant explain.
It works like a charm. EDITED: In main config I have default settings, and gearman with ip (say it A) provided Yii should override main with local, hovewer it seems it doesnt (so foreach maybe not the case) |
I don’t know PHP very well, but, if I do a web search for “PHP foreach not working”, I certainly get a lot of hits. It seems like a fairly common problem. Anyway, I’m glad you found that the problem wasn’t with gearmand. Please close the issue if there is nothing else. |
Hello, |
So the PHP client doesn't disconnect even after the server returns the job result? That sounds like a bug in the PHP library to me. I don't think we've seen that with the Gearman Perl library. The main issue when talking about the PHP Gearman library is which one? There have been multiple implementations and multiple maintainers, most of whom have stopped maintaining, AFAIK. Honestly, I don't even know where to go to get the latest, best version. |
It's just does not work under PHP5.4 (centos 6). Tried to look at source, without success. https://stackoverflow.com/questions/56152265/php-gearmanclientdobackground-just-hangs. Could you please advice something? Killed almost week
The text was updated successfully, but these errors were encountered: