My dev server is Debian Squeeze and I\'m running Gearman 1.1.5 which I compiled from source along with the php pecl extension v1.1.1
If I run the reverse_client.php
In my case it's little different. I got this same error when I had my addServer
code inside the loop.
$client = new GearmanClient();
for ($i=0; $i<100000; $i++) {
$client->addServer("127.0.0.1", 4730);
$data = json_encode(array('job_id' => $i, 'task_name' => 'send-email'));
$client->addTaskBackground('sendEmail', $data);
}
$client->runTasks();
And this fixed it for me:
$client = new GearmanClient();
$client->addServer("127.0.0.1", 4730);
for ($i=0; $i<100000; $i++) {
$data = json_encode(array('job_id' => $i, 'task_name' => 'send-email'));
$client->addTaskBackground('sendEmail', $data);
}
$client->runTasks();