Zend Server JobQueue issue

Zend Server may be a really helpful product and only ZendJobQueue by itself is a great concept for multitasking, queuing or even regular cron replacement. But unfortunately it lacks a good documentation

For instance I have not managed to find anything official about ZendJobQueue as nearly good as Zend Framework documentation. There are some good blog posts and presentations though which were great to start with. But they do not include in-depth details or troubleshooting guide.

In my case I ran into the following error message: ‘Bad response from Job Queue server to a createHttpJob request. QLocalSocket: Remote closed.’ once I tried to go beyond simple test code.

Although Zend Server was up and running and test ZendJobQueue code was working, it looked like everything had crashed really bad…

A quick search showed that someone had already run into a similar Job Queue problem about a year ago. No solution has been posted though. But the fact that my test code still was working helped to address the issue.

So here is my original call which caused the error message showed above.

$params = array('paramValue');
$q = new ZendJobQueue();
$q->createHttpJob('/task.php', $params);

And this is the call which works perfectly

$params = array('paramName' => 'paramValue');
$q = new ZendJobQueue();
$q->createHttpJob('/task.php', $params);

So apparently the $params array must have keys!
Of course one can tell that simply by looking at the error message but it was not that obvious for the first hour.

P.S.: Zend Server 5.1 Development License.

No Comment

No comments yet

Leave a reply