{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/7224","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/7224/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/7224/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/7224/events","html_url":"https://github.com/cakephp/cakephp/pull/7224","id":100685023,"number":7224,"title":"Increase shutdown memory for Fatal Error handling","user":{"login":"adam1010","id":3019544,"avatar_url":"https://avatars.githubusercontent.com/u/3019544?v=3","gravatar_id":"","url":"https://api.github.com/users/adam1010","html_url":"https://github.com/adam1010","followers_url":"https://api.github.com/users/adam1010/followers","following_url":"https://api.github.com/users/adam1010/following{/other_user}","gists_url":"https://api.github.com/users/adam1010/gists{/gist_id}","starred_url":"https://api.github.com/users/adam1010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adam1010/subscriptions","organizations_url":"https://api.github.com/users/adam1010/orgs","repos_url":"https://api.github.com/users/adam1010/repos","events_url":"https://api.github.com/users/adam1010/events{/privacy}","received_events_url":"https://api.github.com/users/adam1010/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/58","html_url":"https://github.com/cakephp/cakephp/milestones/2.7.4","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/58/labels","id":1268551,"number":58,"title":"2.7.4","description":"Bugfixes and minor optimizations for 2.7.x.","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":6,"state":"open","created_at":"2015-08-24T02:25:19Z","updated_at":"2015-09-07T20:27:03Z","due_on":"2015-09-20T04:00:00Z","closed_at":null},"comments":41,"created_at":"2015-08-13T03:58:59Z","updated_at":"2015-09-08T09:37:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/7224","html_url":"https://github.com/cakephp/cakephp/pull/7224","diff_url":"https://github.com/cakephp/cakephp/pull/7224.diff","patch_url":"https://github.com/cakephp/cakephp/pull/7224.patch"},"body":"When a script runs out of memory and triggers a fatal error there often is not enough additional memory left to execute the Cache::write() calls in the shutdown() hook causing execution to stop prematurely. If those Cache calls are skipped over, then the code usually stops prematurely somewhere in the middle of the error handler.\r\n\r\nThis patch has been tested and verified using the function below. It allows the shutdown() hook to complete gracefully by providing additional memory.\r\n\r\nThis problem exists on all 2.X versions  (and possibly in 3.X as well)\r\n\r\n$x = array();\r\nwhile(true){  $x[] = rand(); }"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/138496259","html_url":"https://github.com/cakephp/cakephp/pull/7224#issuecomment-138496259","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/7224","id":138496259,"user":{"login":"dereuromark","id":39854,"avatar_url":"https://avatars.githubusercontent.com/u/39854?v=3","gravatar_id":"","url":"https://api.github.com/users/dereuromark","html_url":"https://github.com/dereuromark","followers_url":"https://api.github.com/users/dereuromark/followers","following_url":"https://api.github.com/users/dereuromark/following{/other_user}","gists_url":"https://api.github.com/users/dereuromark/gists{/gist_id}","starred_url":"https://api.github.com/users/dereuromark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereuromark/subscriptions","organizations_url":"https://api.github.com/users/dereuromark/orgs","repos_url":"https://api.github.com/users/dereuromark/repos","events_url":"https://api.github.com/users/dereuromark/events{/privacy}","received_events_url":"https://api.github.com/users/dereuromark/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T09:37:13Z","updated_at":"2015-09-08T09:37:13Z","body":"I also agree that the fuss people make around this issue is way overkill. 4x (anti-)comments for a trivial change.\r\nThis helps to debug. So let it be there for it. Normal code is not affected, nor is 99% of all errors.\r\n\r\nPersonally, I would have probably used \r\n\r\n    Configure::read('Error.extraFatalErrorMemory') \r\n\r\nand an integer, so people could use 0 to deactivate, and > 0 to use a custom value instead of the hardcoded 4.\r\n\r\nBut even as it stands it should be fine."}}