Skip to content
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

Increase timeout on slow classname search REST API #9

Closed
wtwhite opened this issue Aug 28, 2023 · 0 comments · Fixed by #10
Closed

Increase timeout on slow classname search REST API #9

wtwhite opened this issue Aug 28, 2023 · 0 comments · Fixed by #10
Assignees

Comments

@wtwhite
Copy link
Collaborator

wtwhite commented Aug 28, 2023

The https://search.maven.org/solrsearch/select endpoint that shadedetector uses to find definitions of a given classname in the Maven central repo can be very slow, even on repeated queries, and this causes timeout errors. I can repro with curl -- I see successful responses that take up to 19s:

C:\Users\walto\Documents\code\shadedetector>curl "https://search.maven.org/solrsearch/select?q=c%3AXmlTypeResolverBuilder&wt=json&rows=200&start=201" > retry_shadedetector_with_curl.out
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 90112    0 90112    0     0   4522      0 --:--:--  0:00:19 --:--:-- 19770

C:\Users\walto\Documents\code\shadedetector>curl "https://search.maven.org/solrsearch/select?q=c%3AXmlTypeResolverBuilder&wt=json&rows=200&start=201" > retry_shadedetector_with_curl2.out
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 90112    0 90112    0     0   7505      0 --:--:--  0:00:12 --:--:-- 21153

C:\Users\walto\Documents\code\shadedetector>

(I originally thought the issue was be the networking setup of the Linux VM I'm using, but could repro in the Windows host.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant