- per_app_allocation: move host port from 8001 to 28001. OrbStack reserves
8001 on macOS for vcom-tunnel which makes 'Bind: port already allocated'
the default failure mode.
- dirty_ttin_ttou: pin BASE_URL to 127.0.0.1 instead of 'localhost'. macOS
resolves 'localhost' to ::1 first; Docker Desktop / OrbStack only forward
host ports on IPv4 so the IPv6 attempt resets and the test fixture treats
the service as unhealthy.
- dirty_ttin_ttou: add setproctitle to the test image. The TTIN/TTOU tests
count workers via 'pgrep -f dirty-worker', which only matches once
gunicorn's util._setproctitle has actually renamed the processes.
Add support for SIGTTIN and SIGTTOU signals to the dirty arbiter,
allowing dynamic scaling of dirty workers at runtime without restarting
gunicorn.
Changes:
- Add TTIN/TTOU to DirtyArbiter.SIGNALS
- Add num_workers instance variable for dynamic count
- Add _get_minimum_workers() to enforce app worker constraints
- Add signal handlers for TTIN (increase) and TTOU (decrease)
- Update manage_workers() to use dynamic count
- Add documentation for dynamic scaling
- Add unit tests for signal handling
- Add Docker integration tests
The minimum worker constraint ensures TTOU cannot reduce workers below
what apps require (e.g., if an app has workers=3, minimum is 3).
Closes#3489