Skip to content

Conversation

@gabru-md
Copy link
Member

Readme.md has been updated with the latest trends. It did not have the &num=10 mentioned before.
query-server now returns a errorObject in JSON Format whenever 500 error_code is encountered, so that the page is not left stuck.

Fixes #142 and #140

Image for corresponding change:
qs1

Added a dropdown for the number of results and changed the
scrapper and server .py files according to it.

Closes #124 and #59
Readme.md has been updated with the latest trends. It did not have the `&num=10` mentioned before.
query-server now returns a errorObject in JSON Format whenever 500 error_code is encountered, so that the page is not left stuck.

Fixes https://github.com/fossasia/query-server#142 and https://github.com/fossasia/query-server#140
@ghost ghost assigned gabru-md Sep 14, 2017
@ghost ghost added the needs-review label Sep 14, 2017
@AnshulMalik
Copy link
Contributor

Shouldn't we put some efforts to actually fetch the result, why we get the error code 500 at the first step?

This looks like a workaround to me.
How about making the query successful instead of showing error?

@gabru-md
Copy link
Member Author

@AnshulMalik you are very right.
But a 500 error is generally caused when a client sends a lot of requests to the server. I know it because I've studied DOS and DDOS. Server instead of responding to them just ignores them as it configures all those requests to be spam/traffic. (if I'm not wrong)
So there is nothing that we can do on our/query-server's side to resolve this error. 500 error_code response is sent from Google's server to our script.
Please check this page for more info : https://www.lifewire.com/500-internal-server-error-explained-2622938

@AnshulMalik
Copy link
Contributor

@gabru-md Ok. But I am pretty sure google isn't returning 500 response. It's caused by query-server while parsing response from google.
Can you please debug it a little?

@gabru-md
Copy link
Member Author

@AnshulMalik is your PR solving this problem ?

@AnshulMalik
Copy link
Contributor

Yes @gabru-md, it does. Meanwhile, I am trying to generate a demo link.

@gabru-md
Copy link
Member Author

But then it is not generating the required number of results or is it ?

@gabru-md
Copy link
Member Author

@AnshulMalik I believe that your PR is not a fix to the pertaining problem. Since it is defying the very purpose of &num=10 . Therefore I believe it is better to display an error object fot the time ,while we can discuss upon the fact on how to resolve the issue without altering the number of results asked for.
What do you say on this ? I'll be happy to discuss and solve this. :D

@mariobehling
Copy link
Member

Ok, let's iterate from here. Cheers.

@mariobehling mariobehling merged commit 9289cae into fossasia:master Sep 22, 2017
@ghost ghost added ready-to-ship and removed needs-review labels Sep 22, 2017
Remorax pushed a commit to Remorax/query-server that referenced this pull request Jan 14, 2018
PDF/ZIP made with optional background
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants