Limits and timeouts

The numbers the daemon enforces, and what happens when an adapter exceeds them.

All of these are enforced by the daemon. None depends on the adapter's cooperation. They are constants of the protocol version, not configuration.

WhatLimitWhen exceeded
A line, adapter to daemon256 KiBSkipped without being stored. A violation.
A frame the daemon would send256 KiBA request is refused before it is sent (E_ADAPTER_INVALID). An answer to an adapter's request that is too large is replaced by E_REQUEST_TOO_LARGE.
An event line16 KiBTrimmed.
Requests in flight, each direction32 (up to 128 for host.request, when the grant asks)The new request fails at once (-32029, E_ADAPTER_BUSY).
Frames from the adapter500 a second sustained, burst 1000; 8 MiB a secondThe daemon stops reading, so the adapter blocks on its own pipe. Throttled for 10 seconds without a break is a violation.
A write to the adapter's inputNo progress for 5 secondsThe connection is closed and the adapter killed.
Strikes3 in 60 secondsThe adapter is killed and counts as a crash.
Expired request ids remembered1024, for 5 minutesA late reply with such an id is dropped without a strike.
initialize10 secondsThe adapter fails the handshake.
ping5 seconds to answerThree misses in a row kill a service.

What is a violation

A violation, also called a strike, is: a line that is not a valid frame, an oversize line, a frame before initialize, a response to an id that was never issued or was already answered, a reply that does not have the shape of its method, or being throttled too long.

An adapter request with bad params is not a violation. It gets an error. A line that ends the stream half way, an end of file, or a read error closes the connection.