[ZBX-17762] Frequent TCP listen queue overflows Created: 2020 May 18  Updated: 2023 Sep 27  Resolved: 2020 May 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 4.4.7
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Alan Somers Assignee: Zabbix Support Team
Resolution: Duplicate Votes: 0
Labels: patch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

FreeBSD stable/12 amd64


Attachments: File patch-src_libs_zbxcomms_comms.c    
Issue Links:
Duplicate
duplicates ZBX-7933 zabbix generate TCP queue overflow Closed

 Description   

First reported as ZBX-7933 , The zabbix agent frequently suffers TCP listen queue overflows, resulting in messages like "Mar 12 17:20:17 zabbix-p01 kernel: sonewconn: pcb 0xc809dad4: Listen queue overflow: 193 already in queue awaiting acceptance" printed to the system console.  While this is not a correctness issue, it is still a performance issue. All of those dropped TCP connections hurt performance. On my system, I find that when the maximum listen queue is very large, the backlog quickly spikes from 0 to 215 connections before plateauing. This strongly suggests that raising the listen queue size is the correct solution.

 

The attached patch raises the listen queue from the old-fashioned SOMAXCONN to INT_MAX instead.  The operating system will limit the actual queue depth, of course.  On FreeBSD, the actual maximum queue depth is set by the kern.ipc.soacceptqueue sysctl.  SOMAXCONN is a fossil that doesn't have any real meaning anymore.



 Comments   
Comment by dimir [ 2020 May 19 ]

Closing as suplicate of ZBX-7933.

Generated at Tue Apr 29 08:59:00 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.