Commit 3cdfb95
Fix stdin peripheral thread pool exhaustion in Docker
The stdin peripheral was spawning a new run_in_executor thread every 1s
for readline, but with tty:true in Docker, readline blocks forever.
This exhausted the default thread pool (32 threads), starving the
entire event loop — including Telegram polling.
Fix: Use a single persistent reader thread with an asyncio bridge queue
instead of repeated run_in_executor calls.
Also removed stdin_open/tty from norisor docker-compose.yml since
Telegram is now the primary interface.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 56bf262 commit 3cdfb95
1 file changed
Lines changed: 25 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
29 | 38 | | |
30 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
31 | 54 | | |
32 | 55 | | |
33 | 56 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 57 | + | |
38 | 58 | | |
39 | 59 | | |
40 | 60 | | |
| |||
45 | 65 | | |
46 | 66 | | |
47 | 67 | | |
48 | | - | |
| 68 | + | |
49 | 69 | | |
50 | 70 | | |
51 | 71 | | |
| |||
0 commit comments