-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
Querying too many objects runs into maxQueryStringLength for Sdss.query_region -- fix vectorization of queries #2211
Comments
The error coming back from the server is: Unfortunately, a workaround, for now, is to loop through much fewer objects at a time (going by ~20 should work I think, the query URL cannot be longer than 2048 characters, and just the SQL part of yours is ~8200 atm). |
@keflavich asked the SDSS help desk to take a look at this, but I agree with @bsipocz that this should be addressed by making the error message more obvious. I don't think it is going to be possible for SDSS to change the query string length on the server side. There are security considerations if nothing else. |
Ahh, right, this is server-side and not just the GET/POST limit. In that case, I suppose uploading a user catalogue to the x-match service to be used in the SQL service could possibly be the solution to deal with many objects at once. @Nestak2 - in your use case, I suppose it is possible to rewrite the original SQL to merge the two queries into one SQL command and use |
@bsipocz Thank you for the answer and the useful suggestion! I am now trying to implement your suggestion of merging the 2 queries into 1. Nevertheless, I am very new to I tried to do this without
But this then throws the error
Any idea how this could be fixed? Also you wrote that you can see the "error coming back from the server". How is it available, how can I look it up? Tnx |
The logic in #2305 should work for the other methods, too, however I think the GETs should be rewritten for POST queries, and also the SQL code generating method should be refactored. Also, we should really be using the HTM API rather than generating our own, naive, rectangles, I would expect that would also cut back a lot on the actual length of the query string, even without doing the GET/POST changes (but of course it would not be a solution for querying for 20-100k objects). |
This issue seems to be fixed by #2477, so I'm closing. Please feel free to reopen if you still run into it. |
I am trying to extract spectra from SDSS with astroquery. Before I get to this step I encounter a problem - the following throws an error:
The error is:
Strangely enough, if in the query
top 100
is replaced withtop 10
everything is fine. So there is a problem with only a part of the objects. I thought the problem might be just limited to eBoss entries in the database, so tried substitutingprogramname = 'eboss'
withinstrument='SDSS'
and the problem appeared even then. Is there a solution or some kind of a workaround to this? Thank you!The text was updated successfully, but these errors were encountered: