Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoolingHttpClientConnectionManager maxConnections causing issues #146

Open
blarglemeister opened this issue Aug 22, 2018 · 4 comments
Open

Comments

@blarglemeister
Copy link

As I understand it, this servlet does not provide a way to increase the max connections or max connections per route on the PoolingHttpClientConnectionManager. As a result, a few long running requests from a handful of clients can quickly cause connections for all clients to hang until the long running requests complete. As far as I could tell, there's no obvious way to change the values of those two properties in the library.
I created a fork to allow setting both of them to custom values (though since it is one route per servlet, I probably could have just used a single init param to set both values). Should I create a pull request, or is there another, better way to set the max connections?

@dsmiley
Copy link
Collaborator

dsmiley commented Aug 22, 2018

HttpClient is very configurable, and the servlet doesn't try to directly set every possible thing to configure. Instead, the servlet makes a few popular ones configurable, and otherwise is designed to be very sub-classable so that you can configure the HttpClient however you may need. I'm not sure we should bother making further changes here.

@blarglemeister
Copy link
Author

Sure, makes sense. I was running it on a tomcat server that was serving as nothing other than the proxy, so for my purposes it was useful to be able to change that particular value without subclassing (and thus needing another jar for my single class!). I am content to keep my fork to myself.

@dsmiley
Copy link
Collaborator

dsmiley commented Aug 22, 2018

BTW I'm open to ideas to add more configuration in a way that's generic, e.g. by using reflection or perhaps some Properties-style config. I recall HttpClient used to have something along those lines but may have been deprecated (I forget). Ultimately, it's nice to not have to add yet another configuration option into the proxy servlet code.

@blarglemeister
Copy link
Author

blarglemeister commented Aug 22, 2018

Some form of generic configuration is a good idea for people like me who just want to be able to change options in the HttpClient or connection manager. I might try to put something together if I find the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants