{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/jetty.project/issues/874","repository_url":"https://api.github.com/repos/eclipse/jetty.project","labels_url":"https://api.github.com/repos/eclipse/jetty.project/issues/874/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/jetty.project/issues/874/comments","events_url":"https://api.github.com/repos/eclipse/jetty.project/issues/874/events","html_url":"https://github.com/eclipse/jetty.project/issues/874","id":173960424,"number":874,"title":"Jetty client hangs if less than 5 max threads in executor","user":{"login":"dmitrymurashenkov","id":18661137,"avatar_url":"https://avatars3.githubusercontent.com/u/18661137?v=4","gravatar_id":"","url":"https://api.github.com/users/dmitrymurashenkov","html_url":"https://github.com/dmitrymurashenkov","followers_url":"https://api.github.com/users/dmitrymurashenkov/followers","following_url":"https://api.github.com/users/dmitrymurashenkov/following{/other_user}","gists_url":"https://api.github.com/users/dmitrymurashenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/dmitrymurashenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmitrymurashenkov/subscriptions","organizations_url":"https://api.github.com/users/dmitrymurashenkov/orgs","repos_url":"https://api.github.com/users/dmitrymurashenkov/repos","events_url":"https://api.github.com/users/dmitrymurashenkov/events{/privacy}","received_events_url":"https://api.github.com/users/dmitrymurashenkov/received_events","type":"User","site_admin":false},"labels":[{"id":326417667,"url":"https://api.github.com/repos/eclipse/jetty.project/labels/Enhancement","name":"Enhancement","color":"d4c5f9","default":false},{"id":350154659,"url":"https://api.github.com/repos/eclipse/jetty.project/labels/Question","name":"Question","color":"006b75","default":false}],"state":"closed","locked":false,"assignee":{"login":"sbordet","id":414681,"avatar_url":"https://avatars3.githubusercontent.com/u/414681?v=4","gravatar_id":"","url":"https://api.github.com/users/sbordet","html_url":"https://github.com/sbordet","followers_url":"https://api.github.com/users/sbordet/followers","following_url":"https://api.github.com/users/sbordet/following{/other_user}","gists_url":"https://api.github.com/users/sbordet/gists{/gist_id}","starred_url":"https://api.github.com/users/sbordet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbordet/subscriptions","organizations_url":"https://api.github.com/users/sbordet/orgs","repos_url":"https://api.github.com/users/sbordet/repos","events_url":"https://api.github.com/users/sbordet/events{/privacy}","received_events_url":"https://api.github.com/users/sbordet/received_events","type":"User","site_admin":false},"assignees":[{"login":"sbordet","id":414681,"avatar_url":"https://avatars3.githubusercontent.com/u/414681?v=4","gravatar_id":"","url":"https://api.github.com/users/sbordet","html_url":"https://github.com/sbordet","followers_url":"https://api.github.com/users/sbordet/followers","following_url":"https://api.github.com/users/sbordet/following{/other_user}","gists_url":"https://api.github.com/users/sbordet/gists{/gist_id}","starred_url":"https://api.github.com/users/sbordet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbordet/subscriptions","organizations_url":"https://api.github.com/users/sbordet/orgs","repos_url":"https://api.github.com/users/sbordet/repos","events_url":"https://api.github.com/users/sbordet/events{/privacy}","received_events_url":"https://api.github.com/users/sbordet/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2016-08-30T08:35:37Z","updated_at":"2018-04-27T06:54:27Z","closed_at":"2017-10-06T14:30:53Z","author_association":"NONE","body":"Following example hangs with <5 threads and passes if 5+ threads in pool.\n\n```\n    public static void main(String[] args) throws Exception\n    {\n        int threads = 4;\n        HttpClient client = new HttpClient();\n        client.setMaxConnectionsPerDestination(1);\n        client.setExecutor(Executors.newFixedThreadPool(threads));\n        client.start();\n        int status = client.GET(\"http://google.com\").getStatus();\n        System.out.println(status);\n    }\n```\n"},"comment":{"url":"https://api.github.com/repos/eclipse/jetty.project/issues/comments/384882242","html_url":"https://github.com/eclipse/jetty.project/issues/874#issuecomment-384882242","issue_url":"https://api.github.com/repos/eclipse/jetty.project/issues/874","id":384882242,"user":{"login":"marcel91","id":26299332,"avatar_url":"https://avatars2.githubusercontent.com/u/26299332?v=4","gravatar_id":"","url":"https://api.github.com/users/marcel91","html_url":"https://github.com/marcel91","followers_url":"https://api.github.com/users/marcel91/followers","following_url":"https://api.github.com/users/marcel91/following{/other_user}","gists_url":"https://api.github.com/users/marcel91/gists{/gist_id}","starred_url":"https://api.github.com/users/marcel91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcel91/subscriptions","organizations_url":"https://api.github.com/users/marcel91/orgs","repos_url":"https://api.github.com/users/marcel91/repos","events_url":"https://api.github.com/users/marcel91/events{/privacy}","received_events_url":"https://api.github.com/users/marcel91/received_events","type":"User","site_admin":false},"created_at":"2018-04-27T06:54:27Z","updated_at":"2018-04-27T06:54:27Z","author_association":"NONE","body":"We have also some problems with limiting the jetty http client thread pool. In order to save resources, we tried to configure the upper limit of the jetty http client thread pool with\r\n\r\nQueuedThreadPool threadPool = new QueuedThreadPool(8,1);\r\nclient.setExecutor(threadPool);\r\n\r\nThis worked fine in manual tests. I was able to do hundreds of concurrent long running requests without any problems or performance degradation. However problems are occurring in our CI builds, where we run into the situation that the http client doesn't send requests at all anymore. This only occurs on some machines. So it seems to me like some sort of race condition. In a thread dump I saw that only the \"qtp...\" threads were running and no \"HttpClient...scheduler\" thread.\r\nThis problem disappeared once I used the default settings.\r\n\r\nMy question is: Is there a minimum limit for the thread pool that guarantees the http client to work reliably?"}}
{"actor":{"display_login":"marcel91"}}