{"action":"closed","issue":{"url":"https://api.github.com/repos/eclipse/jetty.project/issues/135","repository_url":"https://api.github.com/repos/eclipse/jetty.project","labels_url":"https://api.github.com/repos/eclipse/jetty.project/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/jetty.project/issues/135/comments","events_url":"https://api.github.com/repos/eclipse/jetty.project/issues/135/events","html_url":"https://github.com/eclipse/jetty.project/issues/135","id":134125676,"number":135,"title":"Pause accepting incoming connections when server is under low resource to prevent jetty from OOME","user":{"login":"jmcc0nn3ll","id":273327,"avatar_url":"https://avatars.githubusercontent.com/u/273327?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcc0nn3ll","html_url":"https://github.com/jmcc0nn3ll","followers_url":"https://api.github.com/users/jmcc0nn3ll/followers","following_url":"https://api.github.com/users/jmcc0nn3ll/following{/other_user}","gists_url":"https://api.github.com/users/jmcc0nn3ll/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcc0nn3ll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcc0nn3ll/subscriptions","organizations_url":"https://api.github.com/users/jmcc0nn3ll/orgs","repos_url":"https://api.github.com/users/jmcc0nn3ll/repos","events_url":"https://api.github.com/users/jmcc0nn3ll/events{/privacy}","received_events_url":"https://api.github.com/users/jmcc0nn3ll/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eclipse/jetty.project/labels/Enhancement","name":"Enhancement","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-16T23:23:56Z","updated_at":"2016-03-02T14:45:58Z","closed_at":"2016-03-02T14:45:58Z","body":"migrated from Bugzilla [#425640](https://bugs.eclipse.org/bugs/show_bug.cgi?id=425640)\nstatus ASSIGNED severity *enhancement* in component *server* for *9.1.x*\nReported in version *9.1.0* on platform *PC*\nAssigned to: Project Inbox\n\nOn 2014-01-14 05:16:16 -0500, Zen Zhong wrote:\n\n> I'm running jetty-9.1.0.v20131115, jetty is used as Comet server, it may hold more than 1 million connections, I want to prevent jetty from OOME when there're many connections, so I tried lowresources module and looked into org.eclipse.jetty.server.LowResourceMonitor.java, I found it will try to close all alive connections and jetty will still accept incoming connections.\n> \n> Is it possible to pause accepting incoming connections when server is under low resource?\n\nOn 2014-01-19 19:17:13 -0500, Greg Wilkins wrote:\n\n> \n> Zen,\n> \n> 1,000,000 connections is a really nice number! Both for your application and for jetty/cometd!\n> \n> However, this is a difficult use-case to solve generically as many different applications will want to handle low resources differently.\n> \n> But jetty is very extensible and you can probably add some behaviour to achieve this fairly easily by extending the ServerConnector accept method to have a mutex and  extending the LowResources monitor setLowResources method to grab and hold that mutex to stop the accepting.\n> \n> I guess this could perhaps be added in a generic way to the connectors.... but I'd like to see/hear how this goes for your specific use-case.\n\nOn 2014-01-20 05:34:33 -0500, Zen Zhong wrote:\n\n> Thanks Greg. I'll try it and feedback later.\n\n"}}