Closed dpriskorn closed 9 months ago
async and Wikibase REST API is the obvious solution.
This one caused a 502: http://162.19.226.24:8080/check_subclass_of?qid=Q46952&lang=sv&subgraph=riksdagen_documents
I increased the gunicorn worker timeout to 200 seconds. It's not a good long term solution. The waiting is for getting labels and descriptions asynchronously from the Wikibase REST API. This tool is currently hosted in Europe far from the WMF datacenter so it takes a while when there are many subtopics.
Oh, I might be wrong. This indicates the worker crashes because of a bug. I'll have to test this more to find the cause. Alternatively just rewrite it using Javascript.
Found a bug. Working on a fix.
The bug is now fixed. It still takes 30s to lookup labels, descriptions (async) and cirrussearch totals (no async) which is a pain for users. Under 2s would be ideal. I'm not sure I can do a lot about that because the waiting is all about latency. I can only lower the number of label+description requests by using SPARQL and that takes 3-5s at least on WDQS. Using SPARQL and the Freiburg QLever endpoint I might be able to reduce this to less than 5s total.
Cut off 7 seconds by disabling the fetch for totals
I deployed the fixes above. Timeout is now 120 seconds.
Both reported 502s above now work. Please report further 502s :)
Hard test for new QLever SPARQL implementation: http://localhost:5000/check_subclass_of?qid=Q156&lang=en&subgraph=scientific_articles with 62 subtopics. Took 39s which is still far too long.
Hooray! Because of caching in QLever the request time is now 1.4 seconds on a second run! I absolutely love QLever!
Deployed the new use-qlever branch. Please report any 502s.
This extreme test with 3500+ subtopics now work in 4.4s http://162.19.226.24:8080/check_subclass_of?qid=Q378871&lang=en&subgraph=
https://www.wikidata.org/wiki/Q11451 example check how many subtopics? how do we speed up the process?