-
Notifications
You must be signed in to change notification settings - Fork 1
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
Handling of failed requests #128
Comments
Not easily possible, due to the separation of synospexies and synogroup
Experimental findings in synogroup:
I will add the relevant code to synogroup, such that it retires (after 502) up to 4 times, starting with a 50ms gap, doubling the wait for each retry. Downside of this approach is that it increases the number of requests made. Given that the core issue is that the server seems to struggle with receiving too many requests in too short a time frame, this is non-ideal. @retog ideas on the last point, i.e. reducing the amount of queries sent are very welcome. |
Hmm. The delays don't work for synospecies becuase the 502 errors have no CORS headers, and thus the js code only gets an opaque error. This should be fixable by removing the check for status code. I don't think this check was very neccesary anyways. |
Potential idea to reduce the amount of requests made: Currently, for each taxon concept, there is one request gathering all relevant treatments.
|
e.g SPARQL for 1.:
(Variant without the group_concats seems significantly faster, needs investigation... or
|
e.g SPARQL for 2., here for the deprecating synonyms:
or with distinguishing types of treatments:
The latter is quite fast on either endpoint |
Also, turns out that Synogroup sends some requests multiple times due to a mismanagement of what synonyms are already being handled: this is fixed in plazi/synolib#9, but for some context: https://synospecies.plazi.org/#Doryphoribius+zyxiglobus makes 966 SPARQL requests to the selected backend (for a total of 14 taxon concepts), many of which are duplicates (I found one that was sent 45 times!) The consolodation of queries will reduce the amount of queries setn. but being smarter about not sending duplicates will probably have a much bigger impact. (plazi/synolib#9 reduces the total number of queries sent for Doryphoribius zyxiglobus to 60.) |
Currently, if a SPARQL request fails, synospecies just ignores it, leading to inconsistent/missing results. This happens frequently for species for which many requests need to be made (due to lots of synonyms), e.g. T. rex.
Synospecies should handle this better.
Indicate failures to the user (if no retry/retry failed)The text was updated successfully, but these errors were encountered: