No description provided.
Timeouts before endpoint returns response
Comments (9)
-
-
reporter As a quick fix, you could possibly do something horrible like checking whether it's cached, if yes, return response, otherwise return "Probably still running query; try refreshing in a few minutes".
See https://github.com/scraperwiki/data-services-helpers/blob/master/dshelpers.py#L171-L181
The caveat is: that code did seem to be having issues previously when used here, as it wasn't finding requests that were actually in the cache.
(A better way would be some Ajax-y thing that loads a please wait page and gets the query response when it arrives, though probably no time for that right now.)
-
Ajax doesn't help the JSON version.
Is this timeout not under our control?
I think the informative error message is probably the way forward, bonus points for having a nice HTTP error code (408?) (The HTML one could auto-refresh every so often)
Ideally we'd also want to make sure that a second request for the same material doesn't launch a second query if the first one is running, but that's more tricky.
-
reporter "Ajax doesn't help the JSON version."
True! (Though we could just disable JSON for the query that this seems to happen for)
The timeout is under our control, though it's not ideal to up it indefinitely as several people running such queries could potentially block web access entirely.
-
I've disabled the Framenet queries, which cause the problem, and implemented a query by event label which seems to more efficient.
I consider the JSON response as primary, since we are offering an API rather than a search tool, so wouldn't like to disable it.
-
reporter Happening with this query for me at the moment: https://newsreader.scraperwiki.com/summary_of_events_with_event_label?filter=bribe
-
This one timed out at 14:20 GMT on 2014-06-03
https://newsreader.scraperwiki.com/summary_of_events_with_actor_type?uris.0=dbo:SoccerPlayer
-
In the event we did not experience issues on the Hack Day.
-
- changed status to resolved
- Log in to comment
Can we give an informative error message on timeout?
i.e. "Your query timed out, refresh this page in a few minutes and you might get lucky"