It feels like you're trying to use the wrong architecture/tool for the job, and maybe you should look into using a message queue. beanstalkd has some PHP libraries available and will do blocking reads of the queue. There are some hints on how to proceed in this StackOverflow question.