Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

coxy121's avatar
Level 20

supervisord horizon issue - horizon: ERROR (spawn error)

I have supervisord set up on one of my servers and have a horizon.conf file set up and configured as per the documentation.

All was working as expected, but I noticed today horizon was inactive. When manually trying to restart using supervisorctl restart horizon I get the following error:

horizon: ERROR (spawn error)

The logs show this message:


In ArgvInput.php line 259:

  Invalid argument supplied for foreach()


Content-type: text/html; charset=UTF-8

However if I run php artisan horizon from the command line it successfully starts.

Has anyone encountered this error before or have any idea how to resolve it?

0 likes
1 reply
coxy121's avatar
coxy121
OP
Best Answer
Level 20

I am not sure why the issue started occurring, but I was able to resolve the error by updating my horizon.conf file and changing the line.

command=php /home/sharedinsight/public_html/sharedinsight/current/artisan horizon

to

command=php-cli /home/sharedinsight/public_html/sharedinsight/current/artisan horizon

Please or to participate in this conversation.