fluent / fluent/fluent-logger-forward-node
`TimeoutOverflowWarning` after many retries
- Dominant language
- TypeScript
- Stars
- 12
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
The `maxDelay` parameter defaults to `Infinity`:
https://github.com/fluent/fluent-logger-forward-node/blob/937ad65703067cad762570c2e60fad4c6262255c/src/socket.ts#L323
https://github.com/fluent/fluent-logger-forward-node/blob/937ad65703067cad762570c2e60fad4c6262255c/src/event_retrier.ts#L57
In the case where the computed delay is larger than the maximum 32-bit signed integer (`2 ** 31 - 1`), a `TimeoutOverflowWarning` is emitted by `setTimeout`, the value `1` is assumed, and we end up waiting only 1 millisecond before retrying, which causes frequent retries.
I have worked around this issue by passing:
```js
socket: {
reconnect: {
maxDelay: 2 ** 31 - 1
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.