Cause: the client-side PerEndpointConnectTimeout (3 s), not opc-plc. The
validate:null case is the first test the assembly runs, so it pays the
cold-process cost of the first Basic256Sha256 connect: loading the fresh
throwaway certificate, validating the server's, and the asymmetric handshake.
In the G2 full-solution run that local work used up the budget. The opc-plc
log at 13:13:50-53Z shows the discovery channel closing at 50.709, then nothing
from the client for 3 s, then OpenSecureChannel answered at 53.775 and the
client closing the channel 48 ms later. The SDK reports a wait cancelled by
that budget as BadRequestInterrupted. opc-plc auto-accepted the certificate
(--aa, "Trusting certificate ... command line option") with no reject and no
store round-trip.
- Driver: a per-endpoint budget expiry now surfaces as TimeoutException naming
PerEndpointConnectTimeout instead of BadRequestInterrupted or a bare
TaskCanceledException. There is no behaviour change. Unit test added
against a silent TCP listener.
- Test: the ServerHostNameValidationTests secure options use a 15 s budget,
the same as the browser integration tests' 10 s. Connect latency is not
what these tests check.
- docs/drivers/OpcUaClient.md: documents what the budget covers.
Root cause: pymodbus 3.13's `pymodbus.simulator` console script hard-codes
asyncio.run(run_main(), debug=True). Debug mode captures a traceback per
scheduled callback and logs callbacks slower than 100 ms (the "took 0.146
seconds" lines in #909). Side by side on the shared docker host (closed-loop
FC03 clients, 2 s deadline): 100 clients got ~120-170 req/s, p99 1.6-1.9 s
with client timeouts in debug mode vs ~2400 req/s, p99 ~135 ms without it.
The shared sim also carries the docker-dev rig's 49 Modbus drivers on each of
central-1/central-2 (98 sockets, ~220 req/s at idle), which is above the
debug-mode capacity, so a test run on top was answered late ("Cancel send,
because not connected!") and timed out.
- run_simulator.py: same CLI as pymodbus.simulator, debug=False, plus a watchdog
thread that exits after 3 failed FC03 probes so restart: unless-stopped
replaces the container (docker has no restart-on-unhealthy).
- fc3_probe.py: stdlib FC03 read with a deadline (MBAP or RTU framing); the
compose healthcheck.
- docker-compose.yml: shared anchor for every pymodbus service: new entrypoint,
`project: lmxopcua` label, restart: unless-stopped, healthcheck, bounded
json-file logs.
- README: why, the numbers, and how to diagnose load.
ScriptRunGuard counts a run on StartedRunCount and InFlightCount together the
moment it is admitted, but releases InFlightCount only in the run's finally.
The runaway test waited on StartedRunCount >= 6 and then asserted
InFlightCount == 1, so the healthy sibling's 4th-push run - admitted but still
executing - was counted alongside the runaway orphan (2). Test race, not an
engine defect: widening only the healthy run reproduced it 5/5.
- wait until StartedRunCount == 6 AND InFlightCount == 1
- healthy predicate spins ~100 ms so the window is open on every run
- positive controls: the final push must be refused once more (the in-flight
run is the orphan) and the quality-once absence check runs only after the
healthy Activated event from the later pass has been delivered
Under 28 busy-loops on 14 cores: before 2/60 failed, after 0/60.