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

Long Response Time or Timeouts for localhost server #140

Open
aleksandr-leontev opened this issue Jun 7, 2020 · 1 comment
Open

Long Response Time or Timeouts for localhost server #140

aleksandr-leontev opened this issue Jun 7, 2020 · 1 comment
Labels

Comments

@aleksandr-leontev
Copy link

aleksandr-leontev commented Jun 7, 2020

Hi,
By some reason this data by this url generates for me within 8-10 minutes on localhost:
LinkThumbnailer.generate('https://www.quora.com/What-are-some-top-automation-tools-that-entrepreneurs-use')

But on staging or production servers it takes several seconds.
Do you know the reason or it is some bug?
Or which timeouts I can limit for localhost?

@gottfrois
Copy link
Owner

It looks like it's stuck in the loop which follows URL redirections. Doing a simple curl request on the original URL shows a redirection:

$ curl -iL https://www.quora.com/What-are-some-top-automation-tools-that-entrepreneurs-use
...
location: https://www.quora.com/What-are-some-top-automation-tools-that-entrepreneurs-use-things-used-for-organizing-life-contacts-deals-finding-information-networking-and-getting-things-accomplished
...

The gem will try to follow redirections and raise an exception if there were too many redirections. It's controllable using the :redirect_limit option.

However here it doesn't help for some reason, not obvious to me at the moment.
Using the definitive URL does resolve in matter of a few seconds:

LinkThumbnailer.generate('https://www.quora.com/What-are-some-top-automation-tools-that-entrepreneurs-use-things-used-for-organizing-life-contacts-deals-finding-information-networking-and-getting-things-accomplished')

@gottfrois gottfrois added the bug label Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants