Doc #68322 [NEW]: GearmanWorker::addServer involves socket I/O, different than documentation
| From: | minhao dot zhang at qq dot com | Date: | Wed, 29 Oct 2014 10:01:48 +0000 |
| Subject: | Doc #68322 [NEW]: GearmanWorker::addServer involves socket I/O, different than documentation | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-11593@lists.php.net to get a copy of this message | ||
From: minhao dot zhang at qq dot com
Operating system: Mac OSX 10.9
PHP version: 5.5.18
Package: gearman
Bug Type: Documentation Problem
Bug description:GearmanWorker::addServer involves socket I/O, different than documentation
Description:
------------
---
From manual page: http://www.php.net/gearmanworker.addserver
---
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:
---------------
<?php
$gearman_worker = new GearmanWorker();
$gearman_worker->addServer('localhost', 4730);
sleep(100);
Expected result:
----------------
no connection is established when addServer is called alone
Actual result:
--------------
a TCP connection is observed when addServer is called alone
--
Edit bug report at https://bugs.php.net/bug.php?id=68322&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68322&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68322&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68322&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68322&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68322&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68322&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68322&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68322&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68322&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68322&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68322&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68322&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68322&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68322&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68322&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68322&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68322&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68322&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68322&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68322&r=mysqlcfg