Error handling

When processing a stream, the agent can react differently to errors that occur.

Specifically, the user can define behavior related to End of File (EOF) errors and decoding errors.

Note

These parameters are not available for video file processing.

The behavior for these errors is configured in the corresponding behavior_parameters sections when creating stream, and they share a common structure (eof_retry and decode_error_retry respectively).

Example of behavior_parameters
"behavior_parameters": {
    "eof_retry": {
        "attempt_count": 1,
        "delay": 100
    },
    "decode_error_retry": {
        "attempt_count": 2,
        "delay": 200
    },
}

Note

See Luna-Video-Manager documentation for more stream creation request details

For each error type, it allows to specify the number of reconnection attempts and the time interval between them.

If the error occurs, the specified number of reconnection attempts will be made at the specified intervals.

If any of these attempts are successful, the counter will be reset, and stream processing will continue.

Each of attempts will be logged:

`Attempt to reconnect to stream: <ATTEMPT> of <ATTEMPT_COUNT> due to <REASON>`
where:
  • <ATTEMPT> is current attempt number

  • <ATTEMPT_COUNT> is max attempts specified by user

  • <REASON> reason which caused reconnect attempt

If decoding fails after the specified number of attempts, the stream will either be:
  • marked as done in case of EOF

  • marked as failed in case of decoding error