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

dagfooyo's avatar

Job queue is broken, error when running queue:restart

My app is working fine on my development server, but every time I update the job handler and push the code to my Production server and restart the queue, it refuses to run at all. And I get this error when I run php artisan queue:restart:

 ErrorException  : file_put_contents(/var/www/html/ads-manager/storage/framework/cache/data/ee/2f/ee2f842aa7bb1f53edf3a2ed2c09a1807ffa6c90): failed to open stream: No such file or directory

at /var/www/html/ads-manager/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122
    118|      * @return int
    119|      */
    120|     public function put($path, $contents, $lock = false)
    121|     {
  > 122|         return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
    123|     }
    124|
    125|     /**
    126|      * Prepend to a file.

I've tried running all the usual commands to clear stuff out:

queue:restart
config:clear
config:cache
composer dump-autoload -o
composer update

I've emptied out the jobs table and the failed jobs table both programmatically, through artisan and manually in phpmyadmin. I even tried php artisan migrate:reset and re-migrated all my tables. I manually dropped all my tables and re-migrated. None of that worked.

One thing did work, which was completely deleting the entire app and re-installing it, but the problem started again the next time I updated the app. And I am obviously not gonna be able to completely reinstall the app every time, especially once the app is in production.

What can I do to fix this error?

0 likes
2 replies
dagfooyo's avatar

I thought I had fixed this but it keeps happening. It seems to happen whenever I restart the queue after I've updated the job code.

Any thoughts what might be causing this?

Please or to participate in this conversation.