Hello,
wondering if anyone is using fork=no -- some old docs suggest it is suitable for debugging, but actually kamailio doesn't work properly in this mode, leading to more troubles than benefits (e.g., having reports of invalid issues, like tcp not working in this mode).
In first phase I would disable setting this value, with a warning if set to no, because most of the configs out there have fork=yes. Removing it could be considered in the future.
Note that this fork=no is different than don't daemonize controlled with -D, which will stay being useful for some init.d systems.
Comments or other suggestions?
Cheers, Daniel
On 20 Jan 2016, at 09:19, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
wondering if anyone is using fork=no -- some old docs suggest it is suitable for debugging, but actually kamailio doesn't work properly in this mode, leading to more troubles than benefits (e.g., having reports of invalid issues, like tcp not working in this mode).
In first phase I would disable setting this value, with a warning if set to no, because most of the configs out there have fork=yes. Removing it could be considered in the future.
Note that this fork=no is different than don't daemonize controlled with -D, which will stay being useful for some init.d systems.
What is the difference?
I have been using fork=no a lot in test scripts, but could possibly move to -D. Having a config file parameter is easier though, said the lazy man.
/O
Comments or other suggestions?
Cheers, Daniel
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com http://miconda.eu
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On 21/01/16 08:46, Olle E. Johansson wrote:
On 20 Jan 2016, at 09:19, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
wondering if anyone is using fork=no -- some old docs suggest it is suitable for debugging, but actually kamailio doesn't work properly in this mode, leading to more troubles than benefits (e.g., having reports of invalid issues, like tcp not working in this mode).
In first phase I would disable setting this value, with a warning if set to no, because most of the configs out there have fork=yes. Removing it could be considered in the future.
Note that this fork=no is different than don't daemonize controlled with -D, which will stay being useful for some init.d systems.
What is the difference?
I have been using fork=no a lot in test scripts, but could possibly move to -D. Having a config file parameter is easier though, said the lazy man.
kamailio -h gives some short explanation.
When fork=no, no sip workers are created, tcp not working, if no listen is set, it binds only to first network interface (can be loopback). This is like -D.
-DD is main process is not daemonizing itself, so stays attached to the terminal (so can be killed with CTR+C) but the rest of processed (sip workers, timers) are forked like normal.
-DDD is like fork=yes, the main process being optimized as well.
For proper debugging and also staying attached to terminal, the -DD and children=1 is the best combination.
Cheers, Daniel