Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix / Add a timeout to avoid hanging requests #403
Conversation
|
Everything looks good to me |
|
@paulodiovani By the way, I really appreciate the detailed and well written PR. It is very easy to understand :) |
f19c95b
to
07c3fc3
|
What is the goodness of As far as the change to the tests goes, the load of the |
|
@hoadlck I'll do the changes you requested and move the file read to setup. |
07c3fc3
to
e243399
torerobo
commented
Dec 7, 2019
Yes, the patch works successfully. I confirm. |
|
In regards to the timeout of 10.0s...in my test setup, I get many timeout errors even increasing the timeout up to 90s. My connection is not that terrible, so I don't think that 10s is a good number. In addition to this, we should not be using any global variable in Sherlock. I know that there are some now: this is one of the pains that I am having in doing the restructuring. I decided to make the timeout a command line option. By default, the timeout will be disabled (just as it was before). But, a user can specify something shorter if they like. I think that there are performance problems with some of the sites that have been added recently. If that keeps up, they are going to have to be pruned. I am also seeing anomalies in how the timeout functions. When I set the timeout to 90s, I get completion times of less than that, with multiple error connecting problems. I think that there is something more basic causing problems: probably a manifestation of the problem noticed in #323. I am thinking that the naive way that Sherlock spawns a thread for all sites at the beginning of the query is overwhelming people's computers. We now have enough sites that we are hitting this limit. This is something I am working on in the restructuring. |
|
Merged it. |
torerobo
commented
Dec 8, 2019
|
The "time delay" patch works for me successfully, but after a few times I get multiple "connection errors". Maybe it is better to add "exclusion of bad sites" to cli? For example,
|
|
No: if we have bad sites, they need to be pruned. I think that many of the recently added sites have slow response. I did not have time to look into it yesterday, but I hope to today. |
torerobo
commented
Dec 8, 2019
|
Mmm, I don’t know how else to explain. The "pling" site is not bad, but it does not work in the ru location (3000000 ip addresses are blocked in the ru location) and sherlock stumbles on it. And in China, for example, perhaps half of the list does not work, but this does not mean that the site is bad. |
MinePro120
commented
Dec 13, 2019
|
I'm a little late, but it works fine now, yes. Issue closed. |
paulodiovani commentedDec 4, 2019
Some websites may fail to respond to the requests at all, as a result the process will be stuck, a simple solution is to set a timeout, as supported by the
requestsmodule.Changes in this pull request
Note: In my tests, 10s was enough even with Tor. Sometimes a site may take longer to respond, but a longer timeout will make the script takes to much time (waiting + retries) and the retries will usually handle intermittent connections.
tests/.excluded_siteslist to allow pass tests for unresponsive sitesFixed issues
This PR shall fix these issues.
It would be nice if the reporters could check if they still persist.