Commit 67c33d4
committed
Fix inotify watch exhaustion on large resolver lists
This release fixes a critical issue where processing large lists of DNS
resolvers (65k+) would exhaust system inotify watches, causing c-ares
initialization failures and resulting in incomplete validation results.
Changes:
- Implemented DNS resolver instance caching to reuse resolver objects
- Added thread-safe resolver cache with async lock protection
- Each unique server now uses a single resolver instance instead of
creating a new one for every query
- Prevents "Failed to initialize c-ares channel" errors
- Significantly reduces system resource usage during large batch processing
Tested with 65k+ resolver lists - now processes all resolvers successfully
without resource exhaustion.
Version bumped to 2.3.11 parent 241f1a9 commit 67c33d4
3 files changed
Lines changed: 36 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
8 | 16 | | |
9 | 17 | | |
10 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
99 | 122 | | |
100 | 123 | | |
101 | 124 | | |
102 | 125 | | |
103 | | - | |
| 126 | + | |
104 | 127 | | |
105 | 128 | | |
106 | 129 | | |
| |||
192 | 215 | | |
193 | 216 | | |
194 | 217 | | |
195 | | - | |
| 218 | + | |
196 | 219 | | |
197 | 220 | | |
198 | 221 | | |
| |||
205 | 228 | | |
206 | 229 | | |
207 | 230 | | |
208 | | - | |
| 231 | + | |
| 232 | + | |
209 | 233 | | |
210 | 234 | | |
211 | 235 | | |
| |||
0 commit comments