The nsq module creates several processes for consumer workers. The ranks for all this process are incremented one by one, starting with value 1. Value 1 is defined as PROC_SIPINIT and has a special meaning for most of the regular modules. One side effect of this is that the registration records are loaded from the db twice! One simple fix would be to fork all the workers with a PROC_NOCHLDINIT ranking.
when we set `PROC_NOCHLDINIT` on the consumer workers, the module cannot bind to the presentity table. Perhaps @miconda would know why this is the case, but this is the error:
``` ERROR: <core> [db.c:452]: db_use_table(): invalid parameter value [presentity] ERROR: nsq [nsq_pua.c:146]: nsq_pua_update_presentity(): unsuccessful use_table [presentity] ERROR: <core> [db.c:452]: db_use_table(): invalid parameter value [active_watchers] ERROR: presence [notify.c:1034]: get_subs_db(): in use_table ERROR: presence [notify.c:1227]: get_subs_dialog(): getting dialogs from database ```
@ovidiusas I've submitted a PR for this issue, can you please test the branch and confirm it resolves the issue?
Fixed in trunk via commit 770c914d3636cfafccc4931f18aa804efcacbd73
Closed #975.
@eschmidbauer Please backport this to 5.0 branch.
the patch was been back ported https://github.com/kamailio/kamailio/commit/62e6271dba40a8bb0dc96992e37877bb...