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

Consumer thread blocked by initial verification timeouts #87

Closed
colsond opened this issue Mar 11, 2015 · 0 comments
Closed

Consumer thread blocked by initial verification timeouts #87

colsond opened this issue Mar 11, 2015 · 0 comments

Comments

@colsond
Copy link
Contributor

colsond commented Mar 11, 2015

When a new agent advertises itself to shoal the server tries to verify it when it is added to the list of squids. In the case of an old or misconfigured agent that is running behind a firewall the server is hung waiting for the connection to time out.

To fix this a timeout can be specified in the requst.get call ex:

requests.get(targeturl, proxies=proxies, timeout=1)

this would result in a timeout after one second if there is no response freeing up the consumer thread to do its job.

Alternatively the initial verification could be stripped out of the consumer thread and just have the verification thread handle all verification processes.

colsond added a commit that referenced this issue Mar 12, 2015
I've added a 2 second timeout to the verification request.
This should allow time for the file to be downloaded even
if it is half the world away. This should make for a more
responsive server on a restart adding the squids back to
human UI much faster. This will also make it so the server
never spends more than 2 seconds on a bad(unverifiable)
squid.
@colsond colsond closed this as completed Apr 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant