|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #68322 GearmanWorker::addServer involves socket I/O, different than documentation
Submitted: 2014-10-29 10:01 UTC Modified: 2017-01-10 08:24 UTC
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: minhao dot zhang at qq dot com Assigned:
Status: Suspended Package: gearman (PECL)
PHP Version: 5.5.18 OS: Mac OSX 10.9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: minhao dot zhang at qq dot com
New email:
PHP Version: OS:


 [2014-10-29 10:01 UTC] minhao dot zhang at qq dot com
From manual page:

GearmanWorker::addServer will establish a TCP connection with gearmand server. This is not the same behaviour as documentation says.

run test script and try the following from your gearmand server:

lsof -i tcp | grep gearman

you can notice that a TCP connection is already established even if we do not call $gearman_worker->work() 

Test script:
$gearman_worker = new GearmanWorker();
$gearman_worker->addServer('localhost', 4730);

Expected result:
no connection is established when addServer is called alone

Actual result:
a TCP connection is observed when addServer is called alone


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-10 08:24 UTC]
-Status: Open +Status: Suspended
 [2017-01-10 08:24 UTC]
The gearman extension have not had much activity in the past few years, so I'm taking the safe bet that this is no longer under active development (as I don't consider the typo fixes on the github repo an active development), besides that it also targets unsupported PHP versions. Please unsuspend this report in case it begins to blossom with life once more
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 06:01:28 2024 UTC