Commit a6f3a2b
committed
Fix GH-18956: PHP-FPM Process Count Inconsistencies
This fixes extra increments on keep alive that happen for follow up
request in headers reading stage. It is because the accepting stage
is only done on the first request. It adds a new flag to the on_read
fastcgi callback that sets whether the kept alive request is being
done and then skips the further active increments.
It also fixes issue with incorrect decrement of the active number of
processes. This was done in accepting stage even on the first
which might still be problematic if there are already some running
processes as it decrements their number first and result in incorrect
total (lower than the actual number). The fix is to skip this decrement
of active processes on the first accept.
Closes GH-191911 parent 8fe7930 commit a6f3a2b
File tree
4 files changed
+28
-16
lines changed- main
- sapi/fpm/fpm
4 files changed
+28
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
204 | | - | |
| 203 | + | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
874 | 874 | | |
875 | 875 | | |
876 | 876 | | |
877 | | - | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
878 | 882 | | |
879 | 883 | | |
880 | 884 | | |
| |||
896 | 900 | | |
897 | 901 | | |
898 | 902 | | |
899 | | - | |
900 | | - | |
| 903 | + | |
| 904 | + | |
901 | 905 | | |
902 | 906 | | |
903 | 907 | | |
| |||
1364 | 1368 | | |
1365 | 1369 | | |
1366 | 1370 | | |
| 1371 | + | |
| 1372 | + | |
1367 | 1373 | | |
1368 | 1374 | | |
1369 | 1375 | | |
1370 | 1376 | | |
1371 | 1377 | | |
1372 | 1378 | | |
1373 | 1379 | | |
1374 | | - | |
| 1380 | + | |
| 1381 | + | |
1375 | 1382 | | |
1376 | 1383 | | |
1377 | 1384 | | |
| |||
1479 | 1486 | | |
1480 | 1487 | | |
1481 | 1488 | | |
1482 | | - | |
| 1489 | + | |
| 1490 | + | |
1483 | 1491 | | |
1484 | 1492 | | |
1485 | 1493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | | - | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | | - | |
102 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments