Project

General

Profile

Actions

Bug #67463

closed

Scheduler sometimes uses 100% CPU for days

Added by Lienhart Woitok about 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
scheduler
Target version:
Start date:
2015-06-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

On several servers I regularly notice PHP-CLI processes taking 100% CPU and accumulating several thousand CPU minutes. Today I debugged further and attached gdb to one of these processes and noticed it calling Scheduler->fetchTask in a loop. It was quite hard to really follow the execution flow of php, but as far as I figured it out it does the database query to look for a new task to execute, handles an exception and starts over. A possible path how this can lead to an endless loop is a mysql timeout (mysql has gone away), which results in a FALSE result from exec_SELECTquery, throwing an UnexpectedValueException, which is then handled in scheduler_cli_dispatch.php:68 with a continue call, starting the loop again.

It could easily be fixed by throwing an OutOfBoundsException (which stops the loop) instead of the UnexpectedValueException in case of an SQL error preventing the task fetching. Is there a specific reason why the execution should continue in this case? The exception was introduced by Mathias Schreiber, maybe he can say something about that?


Related issues 1 (0 open1 closed)

Follows TYPO3 Core - Bug #39085: fetchTask: Missing validation of SQL resultClosed2012-07-19

Actions
Actions

Also available in: Atom PDF