Laravel logs don't write when queued by beanstalkd daemon

688 views Asked by At

If I fire the queue from the command line, my log lines write to the log along with any errors.

However, if the queue fires from the beanstalkd queue run as a daemon then no errors or explicit Log calls are written.

What could be blocking them when queued?

1

There are 1 answers

0
eComEvo On BEST ANSWER

This was caused by the fact that when run as a daemon the app instance stays in memory perpetually, so any code changes (such as introducing log lines) won't be reflected.

To fix this, execute php artisan queue:restart or simply click the restart icon in Forge (if using that) after a code deployment.