-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queue just stop executing job and therefore (MySQL server has gone away) #439
Comments
In some rare cases fresh started queue/listener not detecting jobs, until I press ENTER on a console. This happend on a VirtualBox Win 10. Weird behaviors. |
You have |
I think there should be a hard limit on job execution, Ive checked max_execution_time=120. Ok, ive got there are no time limit on console app. Isnt job should be terminated by any timeout? Im not assume job still not executed, because regular job as you can see in log executed about less that one minute, I think job is just stuck somehow. How to terminate such stuck jobs ? |
Also, if it happens every day, and you run this job every day, that would suggest that job always stucks, this is not some random event. |
TTR is Time To Reserve, this is a time the job shouldnt run again until this time passed, it does nothing than wait until resolve job to be repeated. Some of my jobs executed correct more than 30 seconds despite TTR = 30 |
TTR is used as timeout for job process: yii2-queue/src/cli/Command.php Line 185 in 7d12073
Process should be terminated after timeout. In other case unreserved job could be picked by another worker, and having 2 concurrent processes working on the same job is definitely a bad thing. I'm not sure if it works with non-isolate mode. |
Ive added SLEEP(300), Is this a bug? |
Do you have pcntl PHP extension enabled? It could be also some Windows quirk. |
Nope, found info about Note: This extension is not available on Windows platforms. By the way if I used Isolated=1 mode I had this error exceeeded timeout But after some hours spend
|
Just a regular case of using queue.
Normal behavior, with no worker hanging.
I get MySQL server has gone away.
yii queue/listen --verbose --color --isolate=0
if I use isolated mode It can work about 6 days and dies, if I use isolated=1 It dies every day. Having default TTR 30IMPORTANT there no errors before I push ENTER button on console, only after intercation with console this error shown, otherway I just see there nothing happend and can detect process is down only by checking MYSQL process exists. . I assume worker didnt get signal that process gone and wait for it infinitely until wait_timeout reached
SHOW VARIABLES WHERE variable_name LIKE '%timeout%'
yii queue/listen --verbose --color --isolate=0
CreateReport.php
As you can see there is a Yii log should be written right after executing started, but I didnt see this log, so the job didnt executed at all, but has a flag with 1 attemp.
MYSQL LOG
php.ini
t.
console.php
Server
The text was updated successfully, but these errors were encountered: