[OpenSIPS-Devel] [OpenSIPS/opensips] 5c8d13: Event route: Avoid double async dispatching
Liviu Chircu
noreply at github.com
Tue Nov 11 14:03:26 UTC 2025
Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: 5c8d133be1ecbe5bf380f6222cb77cf6ca933d35
https://github.com/OpenSIPS/opensips/commit/5c8d133be1ecbe5bf380f6222cb77cf6ca933d35
Author: Liviu Chircu <liviu at opensips.org>
Date: 2025-11-11 (Tue, 11 Nov 2025)
Changed paths:
M evi/event_route.c
M ipc.c
M ipc.h
Log Message:
-----------
Event route: Avoid double async dispatching
This patch makes it so an event route raised within an async context
(e.g. a clusterer SYNC packet which is processed via async dispatch)
shall no longer trigger yet another async dispatch, as it is effectively
a waste of resources. The 2nd async dispatch will no longer offer any
throughput or performance benefit -- we are already using all workers.
The core problem here was that the @ipc_shared_pipe unnamed pipe has a
default internal buffer of 64K by default, past which the writing
(i.e. the async job deliveries) become blocking. And with each job
taking up 24 bytes... there is space for only ~2700 jobs. Now, try
sync'ing 30.000 usrloc contacts on startup and also run a
double-async-dispatched E_UL_CONTACT_INSERT event_route, all pushing
jobs into the same pipe, and you have a stuck OpenSIPS.
To unsubscribe from these emails, change your notification settings at https://github.com/OpenSIPS/opensips/settings/notifications
More information about the Devel
mailing list