{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4657","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4657/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4657/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4657/events","html_url":"https://github.com/spring-projects/spring-boot/issues/4657","id":119909592,"number":4657,"title":"Shut down embedded servlet container gracefully","user":{"login":"LutzStrobel","id":1766399,"avatar_url":"https://avatars.githubusercontent.com/u/1766399?v=3","gravatar_id":"","url":"https://api.github.com/users/LutzStrobel","html_url":"https://github.com/LutzStrobel","followers_url":"https://api.github.com/users/LutzStrobel/followers","following_url":"https://api.github.com/users/LutzStrobel/following{/other_user}","gists_url":"https://api.github.com/users/LutzStrobel/gists{/gist_id}","starred_url":"https://api.github.com/users/LutzStrobel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LutzStrobel/subscriptions","organizations_url":"https://api.github.com/users/LutzStrobel/orgs","repos_url":"https://api.github.com/users/LutzStrobel/repos","events_url":"https://api.github.com/users/LutzStrobel/events{/privacy}","received_events_url":"https://api.github.com/users/LutzStrobel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-02T10:14:14Z","updated_at":"2015-12-04T09:24:13Z","closed_at":"2015-12-04T09:24:13Z","body":"We are using spring-boot and spring-cloud to realize a micro service archtecture. During load tests we are facing lots of errors such as \"entitymanager closed and others\" if we shut  the micro service down during load.\r\nWe are wondering if there is an option to configure the embedded container to shut its service connector down and waits for an empty request queue before shutting down the complete application context.\r\n\r\nIf there is no such option, I did not find any, then it would be great to extend the shutdownhook of spring to respect such requirements."},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/161917794","html_url":"https://github.com/spring-projects/spring-boot/issues/4657#issuecomment-161917794","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4657","id":161917794,"user":{"login":"LutzStrobel","id":1766399,"avatar_url":"https://avatars.githubusercontent.com/u/1766399?v=3","gravatar_id":"","url":"https://api.github.com/users/LutzStrobel","html_url":"https://github.com/LutzStrobel","followers_url":"https://api.github.com/users/LutzStrobel/followers","following_url":"https://api.github.com/users/LutzStrobel/following{/other_user}","gists_url":"https://api.github.com/users/LutzStrobel/gists{/gist_id}","starred_url":"https://api.github.com/users/LutzStrobel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LutzStrobel/subscriptions","organizations_url":"https://api.github.com/users/LutzStrobel/orgs","repos_url":"https://api.github.com/users/LutzStrobel/repos","events_url":"https://api.github.com/users/LutzStrobel/events{/privacy}","received_events_url":"https://api.github.com/users/LutzStrobel/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T09:24:13Z","updated_at":"2015-12-04T09:24:13Z","body":"Thank you for your advice.\r\nWe currently simply shut down the embedded container and the waiting a short time before closing the application context.\r\n\r\nWhat do you thing, will it be possible in future to shut down a spring boot application more gracefully?\r\n"}}