Bug #44278
High memory consumption of Debugger::renderObjectDump() prevents display of Exceptions
Status: | Resolved | Start date: | 2013-01-02 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | Error | |||
Target version: | TYPO3 Flow Base Distribution - 2.0 | |||
PHP Version: | Complexity: | easy | ||
Has patch: | No | Affected Flow version: | Git master |
Description
When an arbitrary Exception is thrown i get a "Allowed memory Limit"-Error instead of the Flow Exception-Errormessage.
This seems to occure because \Doctrine\Common\Util\Debug::export($object, 12) is called with 12 nesting levels.
In TYPO3\Flow\Error\Debugger:
.... static protected function renderObjectDump($object, $level, $renderProperties = TRUE, $plaintext = FALSE, $ansiColors = FALSE) { $dump = ''; $scope = ''; $additionalAttributes = ''; if ($object instanceof \Doctrine\Common\Collections\Collection) { return self::renderArrayDump(\Doctrine\Common\Util\Debug::export($object, 12), $level, $plaintext, $ansiColors); } ...
if i change the 12 to 6 for example it works.
Sould this not be at least configurable via Settings.yaml?
Related issues
Associated revisions
[BUGFIX] Fix high memory consumption of renderObjectDump()
This change reduces the maximum recursion level for Doctrine Collection
dumps from 12 to 3. This reduces memory consumption during exception
handling and when using \TYPO3\Flow\var_dump().
Change-Id: I50fb3d0ad619bd8212221ee5b5032b474b8cfc7d
Fixes: #44278
Releases: master, 2.0
[BUGFIX] Fix high memory consumption of renderObjectDump()
This change reduces the maximum recursion level for Doctrine Collection
dumps from 12 to 3. This reduces memory consumption during exception
handling and when using \TYPO3\Flow\var_dump().
Change-Id: I50fb3d0ad619bd8212221ee5b5032b474b8cfc7d
Fixes: #44278
Releases: master, 2.0
History
#1 Updated by Bastian Waidelich over 2 years ago
- Priority changed from Should have to Could have
I had the same issue and your change fixed it for me.
But IMO we should rather "fix" the object dumper to avoid recursive loops and maybe a check for memory consumption..
It doesn't make sense to make this configurable I think, because it greatly depends on your objects so this should be cleverer itself
#2 Updated by Bastian Waidelich over 2 years ago
- Priority changed from Could have to Should have
#3 Updated by Martin Brüggemann over 2 years ago
- Priority changed from Should have to Must have
THIS IS A BIG TYPO3 FLOW SHOWSTOPPER FOR BEGINNERS (not me) ;) We should lower the recursion loops from 12 to 3-6!!!
#4 Updated by Karsten Dambekalns over 2 years ago
- Status changed from New to Accepted
- Assigned To set to Karsten Dambekalns
#5 Updated by Gerrit Code Review over 2 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17686
#6 Updated by Karsten Dambekalns over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 261af722510782a060ca78f49f7d730709e27064.
#7 Updated by Gerrit Code Review over 2 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/17688
#8 Updated by Karsten Dambekalns over 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset 4e54aaa06849f6ddcb8bf48fed9089e75f0b02fe.