Skip to content

Commit

Permalink
feat: raise backlog warning log threshold from 1/2 to 2/3 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Aug 2, 2024
1 parent 2bb4fbb commit 61205be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ func (c *wsConn) readFrame(ctx context.Context, r io.Reader) {
}

c.frameExecQueue <- buf
if len(c.frameExecQueue) > cap(c.frameExecQueue)/2 {
if len(c.frameExecQueue) > 2*cap(c.frameExecQueue)/3 { // warn at 2/3 capacity
log.Warnw("frame executor queue is backlogged", "queued", len(c.frameExecQueue), "cap", cap(c.frameExecQueue))
}

Expand Down

0 comments on commit 61205be

Please sign in to comment.