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

HTTP Error 500 in query_adsabs: HTTP/2 500 #4484

Closed
maximmasiutin opened this issue Apr 11, 2024 · 7 comments
Closed

HTTP Error 500 in query_adsabs: HTTP/2 500 #4484

maximmasiutin opened this issue Apr 11, 2024 · 7 comments

Comments

@maximmasiutin
Copy link
Contributor

I am getting HTTP Error 500 in query_adsabs: HTTP/2 500 on certain pages

This can be reproduced on page 11β-Hydroxyprogesterone with --slow command line option.

Maybe it was caused by the changes that I introduced which were related to POST->GET changes?

>Remedial work to prepare citations
[09:54:34] Processing page 11β-Hydroxyprogesterone...

[...]

 >Expanding from BibCodes via AdsAbs API
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Using Zotero translation server to retrieve details from URLs.
   >Retrieved info from http://www.hmdb.ca/metabolites/HMDB04031

>Expand individual templates by API calls
 >Checking CrossRef database for doi.
 >Searching PubMed...
 >Checking AdsAbs database
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Searching PubMed...
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
 >Checking AdsAbs database
   !HTTP Error 500 in query_adsabs: HTTP/2 500
@GlazerMann
Copy link
Collaborator

I saw that too. No idea.

@maximmasiutin
Copy link
Contributor Author

Maybe you could add debugging output for this error, i.e. when this error happens, it saves request and response data. You can add an environment variable to have this output configurable. I will run this on 11β-Hydroxyprogesterone and you will be able to see what's wrong.

@GlazerMann
Copy link
Collaborator

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

https://api.adsabs.harvard.edu/v1/search/bigquery?q=*:*&fl=arxiv_class,author,bibcode,doi,doctype,identifier,issue,page,pub,pubdate,title,volume,year&rows=2000

HTTP/2 500
date: Fri, 12 Apr 2024 13:13:31 GMT
content-type: text/html
content-length: 290

@maximmasiutin
Copy link
Contributor Author

Can you please also give the headers and the body of the request? This line was made by the following code:

    $big_query_opts=[
	      CURLOPT_HTTPHEADER => ['Content-Type: big-query/csv', 'Authorization: Bearer ' . PHP_ADSABSAPIKEY],
	      CURLOPT_CUSTOMREQUEST => 'POST',
	      CURLOPT_POSTFIELDS => "$identifier\n" . implode("\n", $ids)];
    $curl_opts += $big_query_opts;
    unset($big_query_opts);

but we don't see the CURLOPT_POSTFIELDS and CURLOPT_HTTPHEADER (redact the Bearer to not expose the PHP_ADSABSAPIKEY)

@GlazerMann
Copy link
Collaborator

@GlazerMann
Copy link
Collaborator

Nothing in the error messages of value

@maximmasiutin
Copy link
Contributor Author

Nothing in the error messages of value

Let me postpone the proposal of the implementation of the GET to POST for a while, see the comment #4480 (comment)

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

No branches or pull requests

2 participants