Comment 0 for bug 1754164

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

EG 2.12.1 and 3.0.3
OpenSRF 2.5 and 3.0

When requesting shelving locations (open-ils.circ.copy_location.retrieve.all) via the HTTP gateway, the request can time out prematurely if you have a large number of shelving locations.

To reproduce, add a large number of shelving locations to asset.copy_location (over 5,000 in my test environment). Then, request all shelving locations via the gateway:

https://example.com/osrf-gateway-v1?service=open-ils.circ&method=open-ils.circ.copy_location.retrieve.all

On my test server, this returns a null response:

{"payload":[],"status":200}

The open-ils.circ.copy_location.retrieve.all API call itself is not failing: OpenSRF logs show no errors, and the request succeeds via srfsh. However, the gateway logs show a timeout error:

Returning NULL from app_request_recv after timeout: open-ils.circ.copy_location.retrieve.all [null]

The default timeout value is 60s, but we get our null response in only a few seconds. The gateway request succeeds if we supply a larger timeout value as a URL param, e.g.:

https://upstream.catalogue.libraries.coop/osrf-gateway-v1?service=open-ils.circ&method=open-ils.circ.copy_location.retrieve.all&timeout=300

So far I haven't been able to replicate the issue with other API calls that return large chunked responses, but I don't know why there would be anything special about open-ils.circ.copy_location.retrieve.all.