laravel icon indicating copy to clipboard operation
laravel copied to clipboard

Queue worker stops suddenly

Open remyhonig opened this issue 1 year ago • 6 comments

What were you trying to do?

My app needs to import thousands of pdf files and extract their text and generate thumbnails. This is done using the queue because I do not want to block the UI for an hour. This is done by dispatching a job that reads all the files in a directory and make that job dispatch a job for each file it finds.

What happened?

I expect the queue worker to process all the dispatched jobs. But after about 200 jobs it stops. If I restart using artisan native:serve the job starts processing about another 200 jobs and then stops again. However, if I run the artisan native:queue now it processes all jobs as expected without a problem.

How to reproduce the bug

Insert thousands of jobs on the queue and run artisan native:serve, it will stop after a short while.

Package Versions

{ "installed": [ { "name": "nativephp/electron", "direct-dependency": true, "homepage": "https://github.com/nativephp/electron", "source": "https://github.com/NativePHP/electron/tree/0.6.5", "version": "0.6.5", "description": "Electron wrapper for the NativePHP framework.", "abandoned": false }, { "name": "nativephp/laravel", "direct-dependency": false, "homepage": "https://github.com/nativephp/laravel", "source": "https://github.com/NativePHP/laravel/tree/0.5.3", "version": "0.5.3", "description": "Laravel wrapper for the NativePHP framework.", "abandoned": false }, { "name": "nativephp/php-bin", "direct-dependency": true, "homepage": "https://nativephp.com", "source": "https://github.com/NativePHP/php-bin/tree/0.4.0", "version": "0.4.0", "description": "PHP binaries used by the NativePHP framework", "abandoned": false } ] }

PHP Version

8.3

Laravel Version

11.0

Node Version

21.7.0

Which operating systems have you seen this occur on?

macOS

OS version

macos 14.5

Notes

No response

remyhonig avatar Aug 21 '24 07:08 remyhonig