Releases: tma/mbproxy
Release list
v1.4.0
v1.3.0
v1.3 makes stalled or failing upstream Modbus devices safer to handle and easier to diagnose. The main changes are the bounded request handling from #10 and the production diagnostics from #11.
Safer upstream request handling
- One end-to-end deadline now covers cache coalescing, queueing, connection setup, retries, and request pacing. Expired requests won't reach the upstream socket later.
- Reads retry once after a transport failure. Writes are never retried when the device may already have applied them.
- Genuine upstream Modbus exceptions keep their original exception code. Transport, framing, and deadline failures return gateway target failed to respond (
0x0B). - Allowed writes invalidate affected cache entries before and after forwarding. In-flight reads can no longer repopulate pre-write values after a concurrent write.
- Stale fallback is limited to upstream transport failures. It won't replace genuine Modbus exceptions or responses for requests that are already canceled or expired.
Configuration changes
| Variable | What changed | Default |
|---|---|---|
MODBUS_ATTEMPT_TIMEOUT |
New preferred per-attempt socket timeout | 10s |
MODBUS_REQUEST_TIMEOUT |
New total request budget across waiting, connection setup, retries, and pacing | 30s |
MODBUS_TIMEOUT |
Still supported as a deprecated alias for MODBUS_ATTEMPT_TIMEOUT |
unset |
Existing configurations using MODBUS_TIMEOUT continue to work. If both attempt timeout variables are set, their parsed durations must match or mbproxy will fail at startup.
To leave enough time for the single read retry, set MODBUS_REQUEST_TIMEOUT high enough for two attempts, connection delays, request pacing, and dial time. The total request budget always caps each individual attempt.
MODBUS_REQUEST_DELAY now acts as the minimum interval between successful upstream requests. The pacing wait counts against the next request's budget and no longer delays a response that has already been received.
Diagnostics and health
Request lifecycle logs now include request identity, attempt counts, retry decisions, error classification, exception codes, and separate queue, attempt, reconnect, coalescing, and total durations. Write payloads are never logged.
The health response now reports retry counters, failure streaks, success timestamps, and degradation state. Recovered retries remain available over HTTP 200. Sustained first-attempt failures become degraded after one minute, while final upstream failures remain HTTP 503 unhealthy.
Other changes
Full changelog: v1.2.0...v1.3.0
v1.2.0
What's Changed
- chore(deps): bump the all-actions group with 5 updates by @dependabot[bot] in #7
- refactor: per-register cache to fix stale data on writes by @tma in #8
Full Changelog: v1.1.2...v1.2.0
v1.1.2
v1.1.1
v1.1.0
v1.0.0
Initial release
Full Changelog: https://github.com/tma/mbproxy/commits/v1.0.0