activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eramus <lo...@crowdgather.com>
Subject Child processes not able to connect to ActiveMQ -- Stomp + php
Date Fri, 31 Oct 2008 22:40:24 GMT

I am having issues with child processes being able to connect to ActiveMQ via
Stomp. I have two php scripts: one to act as a parent process and the other
to create child processes.

The parent process continuously loops while checking the queue for new
messages to process. When a new message is seen, the parent pulls it off the
bus, forks, and acknowledges the message. That works as expected, but when
the child process tries to connect to the queue to place a response on the
bus, the Stomp client throws an exception. If I do not catch the exception I
get this:

PHP Warning:  stream_select(): unable to select [4]: Interrupted system call
(max_fd=3) in /root/Stomp-CLI/Stomp.php on line 568

Warning: stream_select(): unable to select [4]: Interrupted system call
(max_fd=3) in /root/Stomp-CLI/Stomp.php on line 568
PHP Fatal error:  Uncaught exception 'Stomp_Exception' with message 'Check
failed to determin if the socket is readable' in
/root/Stomp-CLI/Stomp.php:571

I have been able to eliminate this issue by having the parent process sleep
for 60-100ms. This works, but it doesnt seem like it is a fix rather a
crutch -- for every 10 child processes, I lose 1 second. When child
processes are kept to a minimum this doesnt seem like much time, but when
n-children are considered, it could become an issue.

Any ideas/suggestions on what could be causing this?
-- 
View this message in context: http://www.nabble.com/Child-processes-not-able-to-connect-to-ActiveMQ----Stomp-%2B-php-tp20275106p20275106.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message