Explore React child processes to allow process timeout. If feasible it will require some refactoring. More info : http://sergeyzhuk.me/2017/08/07/reactphp-child-process/