You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Timeouts not fully applied when opening connections #3227
Yeah, that's right - I'm sorry your PR didn't make it in, but a more significant redo was needed (including for the test mocking infrastructure)... And raising an issue is just as important as fixing it. In any case, I'm co-assigning you for credit on this issue.
No problem, just glad it is fixed. So, will this be backported? We are on 3.2.7 and I see several breaking changes in 4.x (timezones, numeric data types) that may mean we can't migrate at this time.
#3229 definitely can't be backported as-is, but specifically the part that sets the timeout might be. But I'm curious - this is supposed to be a rather rare issue - with read hanging specifically during connection/authentication. I'm curious - is this recurring on your case? If so, any idea why?
No, I really hope it is rare. It's a customer issue. Not sure how they got into this situation, could be some bad VM settings on the database server, but will need to figure that out as well. There is a fallback mechanism for the database going offline, but this was never reached. Probably need to add a watchdog for this as well.
Ha, your helper resembles this hack we use to fake a timeout in older .NET TFMs where sockets don't support cancellations or timeouts on async operations...
Regardless, your helper does suffer from a concurrency issue - depending on when Break gets called, it may cause undefined behavior as we don't exactly support concurrent operations on the same connector this way...
Activity
roji commentedon Oct 10, 2020
@russellfoster can you please post a comment here so I can co-assign you for contribution credit?
russellfoster commentedon Oct 11, 2020
Hi, Thanks for this. So does this mean you no longer need me to redo the pull request?
Fully honor timeouts during connection phase
roji commentedon Oct 12, 2020
Yeah, that's right - I'm sorry your PR didn't make it in, but a more significant redo was needed (including for the test mocking infrastructure)... And raising an issue is just as important as fixing it. In any case, I'm co-assigning you for credit on this issue.
Fully honor timeouts during connection phase (#3229)
russellfoster commentedon Oct 12, 2020
No problem, just glad it is fixed. So, will this be backported? We are on 3.2.7 and I see several breaking changes in 4.x (timezones, numeric data types) that may mean we can't migrate at this time.
Thanks for all of the attention to this issue!
roji commentedon Oct 12, 2020
#3229 definitely can't be backported as-is, but specifically the part that sets the timeout might be. But I'm curious - this is supposed to be a rather rare issue - with read hanging specifically during connection/authentication. I'm curious - is this recurring on your case? If so, any idea why?
russellfoster commentedon Oct 12, 2020
No, I really hope it is rare. It's a customer issue. Not sure how they got into this situation, could be some bad VM settings on the database server, but will need to figure that out as well. There is a fallback mechanism for the database going offline, but this was never reached. Probably need to add a watchdog for this as well.
russellfoster commentedon Oct 12, 2020
You may get a kick out of this. I did one time consider this helper to class to hack around this issue:
Still needed work to cache more of the reflection stuff. Anyways, not easy to use with Entity Framework and very ugly ha!
roji commentedon Oct 13, 2020
Ha, your helper resembles this hack we use to fake a timeout in older .NET TFMs where sockets don't support cancellations or timeouts on async operations...
Regardless, your helper does suffer from a concurrency issue - depending on when Break gets called, it may cause undefined behavior as we don't exactly support concurrent operations on the same connector this way...