on the agent:
: The most frequent cause is reaching the system's limit for open files ( ulimit ). When Zabbix cannot open new internal connections, it results in broken pipes for existing IPC (Inter-Process Communication) attempts.
Mismatched timeouts are the #1 reason for broken pipes on active checks.
Example: CacheSize=256M (or higher depending on your host count). Check SELinux or AppArmor zabbix cannot write to ipc socket broken pipe upd
This is the most common and often the most effective fix.
ValueCacheSize=64M
: Ensure the Zabbix user has explicit write permissions to its log and PID file locations, as permission denials can occasionally trigger pipe errors. on the agent: : The most frequent cause
Increase the Timeout parameter in both zabbix_server.conf and zabbix_agentd.conf or zabbix_agent2.conf . The default is often 3 seconds, which is insufficient for heavy scripts or slow database queries. Timeout=10 # Try increasing to 10 or 30 seconds max Use code with caution. 3. Database Bottlenecks and Slow Operations
After making changes, perform a clean restart of the Zabbix server. In some cases, orphaned processes can hold onto sockets even after the main service is stopped systemctl stop zabbix-server Verify no zabbix processes remain: ps aux | grep zabbix systemctl start zabbix-server Key Log Indicators Log Message Likely Root Cause cannot write to IPC socket: Broken pipe Peer service closed the connection unexpectedly [24] Too many open files for the Zabbix user is too low cannot send data to preprocessing service Preprocessing manager has crashed or is overwhelmed Connection refused [111] The target service is not running at all Are you seeing these errors on a Zabbix Server
Follow these steps in order to isolate and fix the underlying issue causing the socket failure. 1. Check System Logs for OOM Killer Actions Example: CacheSize=256M (or higher depending on your host
( /etc/zabbix/zabbix_agentd.conf ):
This article dives deep into the causes of this issue and provides step-by-step troubleshooting steps. What is an IPC Socket "Broken Pipe" Error?
Examples of log patterns and interpretation
grep -i "broken pipe" /var/log/zabbix/zabbix_proxy.log