Zabbix Cannot Write To Ipc Socket Broken Pipe Upd ((exclusive)) May 2026

The error "cannot write to IPC socket: Broken pipe" in Zabbix typically indicates that one internal process (like a trapper or poller) tried to send data to another service (like the preprocessing or availability manager) that had already closed the connection or crashed. Direct Fixes

Increase Open File Limits: This is the most common cause. When Zabbix reaches the ulimit for open files, it cannot maintain internal sockets. System-wide: Edit /etc/security/limits.conf and add: zabbix soft nofile 10000 zabbix hard nofile 10000 Use code with caution. Copied to clipboard

Systemd: Edit the Zabbix service file (e.g., /lib/systemd/system/zabbix-server.service) and add: [Service] LimitNOFILE=10000 Use code with caution. Copied to clipboard

Restart the Backend Services: If the preprocessing manager has crashed, other processes will report a "Broken pipe" when trying to talk to it. Run sudo systemctl restart zabbix-server.

Increase Shared Memory: If your HistoryCacheSize or PreprocessingManagerCacheSize is too small, processes may hang or crash when trying to sync data. Troubleshooting Hierarchy 1. Check for Resource Exhaustion Identify if the server is hitting OS-level caps.

Log Clues: Look for failed to open log file: [24] Too many open files. zabbix cannot write to ipc socket broken pipe upd

Verify Limit: Run cat /proc/$(pgrep zabbix_server | head -n 1)/limits | grep "Max open files" to see the actual limit applied to the running process. 2. Service-Specific Failures

"Broken pipe" is often a secondary symptom of a specific manager failing.

Preprocessing Manager: If the logs show cannot send data to preprocessing service, the preprocessing worker processes might be stuck or have crashed.

Availability Manager: Often seen during high load or network instability; ensure the Zabbix database is not locking up, causing a backlog. 3. Kernel Parameter Tuning

If you have a large environment (800+ hosts), the default Linux IPC settings may be too low. The error "cannot write to IPC socket: Broken

Check SHMMAX/SHMALL: Ensure these are high enough to support your Zabbix CacheSize settings.

Check ipcs -l: View current system limits for shared memory and semaphores. 4. Network & External Scripts

Zabbix Server Unstable After Platform Migration/Upgrade to 6.0


✅ 3.6. Check for Zabbix agent mode mismatch

Broken pipe often appears with active checks if the server restarts while agent is sending. Solution: implement retry logic on agent (built-in) and align timeouts.

2. Check which component logs the error

Search logs:

# On Zabbix server
grep -i "broken pipe" /var/log/zabbix/zabbix_server.log

4. Zabbix agent overloaded

Too many concurrent UserParameter calls can exhaust file descriptors or process slots, causing pipe creation to fail.

Fix:

  • Increase StartAgents (or StartAgents=0 with passive checks only).
  • Set Timeout appropriately (but not too high).
  • Reduce parallel calls from Zabbix server (increase item update intervals).

Step 4: Check Permissions

  1. Verify that the Zabbix agent and server have sufficient permissions and access rights.
  2. Check the file permissions and ownership of the Zabbix configuration files and logs.

✅ 3.4. Firewall or network stability

If using TCP sockets (e.g., ListenIP=0.0.0.0 and Server=IP):

  • Check for intermittent packet loss between server and agent.
  • Verify no conntrack table overflow on Linux routers.
  • Increase TCP keepalive on server:
# zabbix_server.conf
StartAgents=0
ListenPort=10051

But for IPC socket (local Unix socket), this is irrelevant – ensure agent and server run on same machine if using /var/run/zabbix/zabbix_agentd.sock.

Solution 7: The Nuclear Option – Reset IPC State

If the error persists and you are certain configs are correct, manually clear stale IPC resources. Passive checks: Server opens connection → agent responds

WARNING: Stop Zabbix server first.

systemctl stop zabbix-server
# Find all IPC objects owned by zabbix user
ipcs -m | grep zabbix | awk 'print $2' | xargs -n1 ipcrm -m
ipcs -s | grep zabbix | awk 'print $2' | xargs -n1 ipcrm -s
ipcs -q | grep zabbix | awk 'print $2' | xargs -n1 ipcrm -q
# Restart
systemctl start zabbix-server

This forces Zabbix to recreate all shared memory segments and message queues from scratch.