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

Drafter blocks requests (locking up) when it has more than 20 concurrent connections to remote sparql service #61

Closed
RickMoynihan opened this issue Jan 14, 2016 · 0 comments

Comments

@RickMoynihan
Copy link
Member

Drafter's SPARQLRepository connection pool is by default configured to 20 concurrent connections. Once these connections are all in use new requests for connections block forever, waiting for a connection to become available.

Now there is a parameter in apache httpclient (which is used by sesame) http.connection-manager.timeout that lets you configure a timeout on that connection - so incoming queries/updates to the remote database will wait for a timeout period on a new connection being found in the pool before raising an exception.

I'd suggest we set this timeout to something like a second - as the odds are if you have to wait for a new connection - stardog has locked up or is too busy anyway - we should just 503 the request - so as not to contribute more load to the problem.

Unfortunately in sesame 2.7.16 we don't have access to the apache http client to set these options. However it looks like in sesame 2.8.6 and sesame 4.x we do have access, so to improve this we'd need to upgrade drafter to use sesame 2.8.x as a pre-requisite to setting this option.

RickMoynihan added a commit that referenced this issue Jan 27, 2016
Also upgraded sesame to 2.8.9 which was only just released.

If the connection pool is busy a ConnectionPoolTimeoutException is
raised.

TODO: This exception is currently rendered in an error page of HTML, we
should return a more meaningful response.
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

1 participant