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

Cushty's avatar
Level 4

How to full restart horizon

Hi I am getting some errors in horizon and it seems its trying to process old code, how exactly is the best way to reset horizon on delpoy script or is there something else i need to do? Thanks

( flock -w 10 9 || exit 1
    echo 'Reloading PHP FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock

php artisan optimize:clear   # This clears ALL caches including config, route, view, and application
php artisan config:cache
php artisan route:cache
php artisan view:cache

npm i && npm run build

$FORGE_PHP artisan horizon:terminate
$FORGE_PHP artisan queue:restart 
0 likes
3 replies
Sinnbeck's avatar

Just run php artisan horizon:terminate

But dont run queue at the same time. Horizon is a replacement for the regular queue!

Cushty's avatar
Level 4

@Sinnbeck Thanks for the reply, this is very weird, we have removed the domain from resend and we are using sendgrid, horizon jobs are failing and it thinks we are still sending email from resend and its getting an error message from resend stating our domian is not connected.

in the env in forge we are just using sendgrid, so it seems like horizon is not clearing out or is not updating to our codebase, could you point in the right direction? Thanks

Please or to participate in this conversation.