-
Notifications
You must be signed in to change notification settings - Fork 486
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
fix(transport): Add extra socket options to the connection pool to fi… #1323
fix(transport): Add extra socket options to the connection pool to fi… #1323
Conversation
…x 'Connection reset by peer' errors (getsentry#1198)
Hi @sliwinski-milosz thx for the PR! |
I would say exposing |
Just to get this right:
Do I get this right? |
I would phrase it slightly differently. It is not because of missing options but because of specific scale behaviours/traffic distributions presumably that this fails. This is fairly non-trivial to repro because it is a low-level problem that only happens on certain systems of a certain size under a certain load distribution. Those magical values might work for certain systems but I do not know why precisely those values are selected. It is much better to leave this as a choice for the end-user than making those precise choices ourselves. If these were sane defaults, I would expect an upstream library (urllib3) to have incorporated them themselves, in which case we do not need this fix at all. |
@sl0thentr0py you have mentioned that you are aware of the issue. Does that mean you have seen it happening on your configurations? If yes, could you please provide more details? So far I was able to reproduce it on I am not sure if at this stage we can assume that it affects only certain systems. In my opinion the next steps are:
If it fails the same way on all systems and after testing it will turn out that the fix works properly - then I would use those extra options as default (still leaving the option to override them). Lets check also if other sdk clients use the keep-alive option or not. Short term I think we should:
What do you think? Could you please also help in fixing the failing |
No I just meant the previous issues here.
I'm not aware of any low level TCP settings in any of the other SDKs.
I don't think we'll be merging this PR in its current form. I think exposing Tangentially, I'm still not convinced tweaking TCP settings is the right thing to do here. Network failures can happen due to whatever reason and that's not the abstraction layer the SDK should care about. What it should do is handle network failures gracefully/retry if possible etc. I will think more about this and see what to do here. |
I am closing this PR as there are other ideas to approach this issue as mentioned in the previous comment. |
…x 'Connection reset by peer' errors (#1198)
I had to add
hasattr
for the options as on some systems some socket options are not available.eg on my MacBook and Python3.7:
However those are available on Ubuntu20.04:
Let me know if you have any idea how we can test this. Like I have described in the issue, I don't know the easy steps to reproduce this issue locally.
However it happens everyday on the system that I run. I have tested it there and the changes from this PR fixed the issue.