Commit 9a3003f
authored
Connections: detect and handle the Linux dead socket case (#2610)
In Linux, we see 15 minute socket stalls due to OS-level TCP retries. What this means is the PhysicalConnection detects no issues on the pipe that's retrying, but is also not receiving data at all leading to long stalls in client applications. The goal here is to detect that we're timing out commands people have issued to the connection but we're getting _NOTHING_ back on the socket at all. In this case, we should assume the socket is dead and issue a reconnect so that we get out of the hung situation much faster.
For an initial go at this, we've chosen 4x the timeout interval as a threshold, but could make this configurable if needed.1 parent 76f5205 commit 9a3003f
File tree
3 files changed
+24
-4
lines changed- docs
- src/StackExchange.Redis
3 files changed
+24
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
| 594 | + | |
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
626 | 637 | | |
627 | 638 | | |
628 | 639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
| |||
720 | 721 | | |
721 | 722 | | |
722 | 723 | | |
723 | | - | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
724 | 729 | | |
| 730 | + | |
725 | 731 | | |
726 | 732 | | |
727 | 733 | | |
| |||
747 | 753 | | |
748 | 754 | | |
749 | 755 | | |
| 756 | + | |
750 | 757 | | |
751 | 758 | | |
752 | 759 | | |
| |||
761 | 768 | | |
762 | 769 | | |
763 | 770 | | |
| 771 | + | |
764 | 772 | | |
765 | 773 | | |
766 | 774 | | |
| |||
0 commit comments