{"action":"created","issue":{"url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/161","labels_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/161/comments","events_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/161/events","html_url":"https://github.com/cloudfoundry/java-buildpack/issues/161","id":60556379,"number":161,"title":"killjava.sh not invoked on java.lang.OutOfMemoryError: unable to create new native thread","user":{"login":"youngm","id":438661,"avatar_url":"https://avatars.githubusercontent.com/u/438661?v=3","gravatar_id":"","url":"https://api.github.com/users/youngm","html_url":"https://github.com/youngm","followers_url":"https://api.github.com/users/youngm/followers","following_url":"https://api.github.com/users/youngm/following{/other_user}","gists_url":"https://api.github.com/users/youngm/gists{/gist_id}","starred_url":"https://api.github.com/users/youngm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youngm/subscriptions","organizations_url":"https://api.github.com/users/youngm/orgs","repos_url":"https://api.github.com/users/youngm/repos","events_url":"https://api.github.com/users/youngm/events{/privacy}","received_events_url":"https://api.github.com/users/youngm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-10T19:36:20Z","updated_at":"2015-09-03T01:37:25Z","closed_at":null,"body":"[This stack overflow topic][0] theorizes that the `OnOutOfMemoryError` process cannot be created because there are no more threads available to the OS in this situation.\r\n\r\nPerhaps we could handle this case for simple `.war` files by implementing the OOM script in a tomcat valve then invoking `System.exit()` in the case of an OOME so that the process exits and the instance restarts?\r\n\r\nSpring Boot apps and such would be on their own in this case but perhaps Spring Boot could provide something general here.\r\n\r\n[0]: http://stackoverflow.com/questions/23373117/xxonoutofmemoryerror-doesnt-work-for-java-lang-outofmemoryerror-unable-to-cr"},"comment":{"url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/comments/137297108","html_url":"https://github.com/cloudfoundry/java-buildpack/issues/161#issuecomment-137297108","issue_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/161","id":137297108,"user":{"login":"youngm","id":438661,"avatar_url":"https://avatars.githubusercontent.com/u/438661?v=3","gravatar_id":"","url":"https://api.github.com/users/youngm","html_url":"https://github.com/youngm","followers_url":"https://api.github.com/users/youngm/followers","following_url":"https://api.github.com/users/youngm/following{/other_user}","gists_url":"https://api.github.com/users/youngm/gists{/gist_id}","starred_url":"https://api.github.com/users/youngm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youngm/subscriptions","organizations_url":"https://api.github.com/users/youngm/orgs","repos_url":"https://api.github.com/users/youngm/repos","events_url":"https://api.github.com/users/youngm/events{/privacy}","received_events_url":"https://api.github.com/users/youngm/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T01:37:25Z","updated_at":"2015-09-03T01:37:25Z","body":"Perhaps something like this could help also: https://github.com/airlift/jvmkill"}}