You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: