Bug #69157
closedscheduler serializes complete exception on task failure
100%
Description
If a task in scheduler fails it does not throw an exception but tries to log it to sys_log.
It logs the complete Exception by serializing it:
if ($failure instanceof \Exception) { // Log failed execution $logMessage = 'Task failed to execute successfully. Class: ' . get_class($this) . ', UID: ' . $this->taskUid . '. ' . $failure->getMessage(); $this->scheduler->log($logMessage, 1, $failure->getCode()); $failure = serialize($failure); } else { $failure = ''; } // Save the updated executions list $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_scheduler_task', 'uid = ' . $this->taskUid, array( 'serialized_executions' => $runningExecutionsSerialized, 'lastexecution_failure' => $failure ));
This often leads to HUGE strings (I had one case with 53MB!!). If this exceeds mysqls max_allowed_packet
(default 16MB) mysql kills the connection resulting in "mysql server has gone away"
Instead of serializing and logging the complete exception only relevant parts (all but Exception->getTrace
) should be logged.
Updated by Gerrit Code Review over 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42717
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42717
Updated by Stephan Großberndt over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e8bc961e5bb89cf852181bb4f6fbac97ff92fc09.
Updated by Gerrit Code Review over 9 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42736
Updated by Stephan Großberndt over 9 years ago
- Status changed from Under Review to Resolved
Applied in changeset 58624b4700dbf334a6f4e48b2d72dc855532dbc2.