-
Notifications
You must be signed in to change notification settings - Fork 32
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
Thread seems to hang in HTTP Call #9
Comments
I was working on a similar issue. A connection is the refreshed correctly after 3 attempts New parameters has been added for a more fine grain http timeouts controls: # HTTP open connection timeout in seconds
:open_timeout => 10,
# Mark a connection as staled after connection_max_hits request
:connection_max_hits => nil Let me know how it goes |
Hey Francesco, thanks for the response. Just tested it with your branch. It seems the thread is still hanging. I diagnosed it, it must be in one of the following lines:
|
Hi @hendricius |
Hi, yep. The problem happens when we are crawling some websites that block us after giving a timeout. Some of them also just return a 500 server error. It seems the crawler continuously tries to request the URL again and hangs in there. -hendrik |
Update: I think it is a problem with the http library of ruby. It seems not to be threadsafe. We are getting this randomly every 3-4 weeks. If I find a solution I will update here. The issue is here: |
We once considered to use Excon instead. (see #37 (comment), item 5) Would this help? |
@tmaier eventually that would work. I guess the best would be to just allow adding your own http library that should be used. What do you think? I read from a few people that they are having issues with threadsafety and the default ruby http library. |
@hendricius @tmaier definitively on our todo list. |
I think we should go for: https://github.com/lostisland/faraday That will make things a lot easier as people can just wire their own library. |
Hi!
it seems one of our threads is stuck in an HTTP call. I think the function is:
https://github.com/taganaka/polipus/blob/master/lib/polipus/http.rb#L170
It looks like the connection is never closed. Any idea what this could be?
Thanks!
Here is a full stacktrace:
The text was updated successfully, but these errors were encountered: