[Freeswitch-users] Memory increase because of multiple instances of freeswitch

António Silva asilva at wirelessmundi.com
Mon Nov 19 11:04:31 UTC 2018


Hi David,

Thank for the reply.

Yes, i've set on sofia profile to shutdown on fail:

<param name="shutdown-on-fail" value="true"/>
<param name="auto-restart" value="false"/>

No, is not started multiple times, i also don't have any cron that would 
start it, is internally that the forking is happing, also the sofia 
profiles are not been restarted: the counters doesn't seem to be reset.

Based on jira:

https://freeswitch.org/jira/browse/FS-10572


Currently i've set a new parameter on switch.conf:

<param name="threaded-system-exec" value="true"/>

So far FS didn't fork to another child process, still waiting a few days 
to validate that this options solve my issue.


On 18/11/2018 00:01, David Villasmil wrote:
> Also, regarding memory usage, that's how FS works. It takes memory AS 
> NEEDED and simply doesn't returns it, it holds it for future use.
> Regards,
>
> David Villasmil
> email: david.villasmil.work at gmail.com 
> <mailto:david.villasmil.work at gmail.com>
> phone: +34669448337
>
>>
> On Sat, Nov 17, 2018 at 11:00 PM David Villasmil 
> <david.villasmil.work at gmail.com 
> <mailto:david.villasmil.work at gmail.com>> wrote:
>
>     I've never seen this...
>
>     Is it possible the process is being started multiple times? You
>     _can_ run fs multiple times, but only the first would start
>     properly as the rest would try to bind to a port already in use by
>     the first process.
>     There's a parameter on all profiles to shutdown if it can't start,
>     try setting that and see what happens.
>     You should also check your crontab... This is NOT normal FS
>     behaviour, as far as i know.
>
>
>     Regards,
>
>     David Villasmil
>     email: david.villasmil.work at gmail.com
>     <mailto:david.villasmil.work at gmail.com>
>     phone: +34669448337
>
>>
>     On Fri, Nov 9, 2018 at 7:48 PM António Silva via FreeSWITCH-users
>     <freeswitch-users at lists.freeswitch.org
>     <mailto:freeswitch-users at lists.freeswitch.org>> wrote:
>
>
>
>
>         ---------- Forwarded message ----------
>         From: "António Silva" <asilva at wirelessmundi.com
>         <mailto:asilva at wirelessmundi.com>>
>         To: FreeSWITCH Users Help
>         <freeswitch-users at lists.freeswitch.org
>         <mailto:freeswitch-users at lists.freeswitch.org>>
>         Cc:
>         Bcc:
>         Date: Thu, 8 Nov 2018 17:53:03 +0100
>         Subject: Re: Memory increase because of multiple instances of
>         freeswitch
>         Forget to put my unit configuration:
>
>         [Service]
>         ; service
>         Type=forking
>         PIDFile=/run/freeswitch/freeswitch.pid
>         ExecStart=/usr/bin/freeswitch -ncwait -nonat -scripts /scripts/fs
>         TimeoutSec=300s
>         Restart=on-failure
>         RestartSec=500ms
>         ; exec
>         User=root
>         Group=daemon
>         LimitCORE=infinity
>         LimitNOFILE=100000
>         LimitNPROC=60000
>         LimitSTACK=250000
>         LimitRTPRIO=infinity
>         LimitRTTIME=infinity
>         IOSchedulingClass=realtime
>         IOSchedulingPriority=2
>         CPUSchedulingPolicy=rr
>         CPUSchedulingPriority=89
>         UMask=0007
>
>
>
>         On 08/11/2018 17:11, António Silva wrote:
>         > Hi all,
>         >
>         > I notice a strange behaviour on machine due to increase of
>         memory,
>         > when i went to see that was the process consuming the memory
>         i notice
>         > that freeswitch have multiple  process running:
>         >
>         > root      2543 90.4  4.8 2178716 1587484 ? S<sl Sep27 36619:46
>         > /usr/bin/freeswitch -ncwait -nonat -scripts
>         /opt/commsmundi/scripts/fs
>         > root      7858  0.0  5.0 2289392 1649484 ?     SN Oct19  
>         0:00 \_
>         > /usr/bin/freeswitch -ncwait -nonat -scripts
>         /opt/commsmundi/scripts/fs
>         > root     30626  0.0  4.4 2172632 1464684 ?     SN Oct23  
>         0:00 \_
>         > /usr/bin/freeswitch -ncwait -nonat -scripts
>         /opt/commsmundi/scripts/fs
>         > root      4505  0.0  4.9 2336544 1621768 ?     SN 10:43  
>         0:00 \_
>         > /usr/bin/freeswitch -ncwait -nonat -scripts
>         /opt/commsmundi/scripts/fs
>         > root     22557  0.0  4.9 2336548 1636604 ?     SN 11:02  
>         0:00 \_
>         > /usr/bin/freeswitch -ncwait -nonat -scripts
>         /opt/commsmundi/scripts/fs
>         >
>         >
>         > and today:
>         >
>         > root     21823 93.9  4.8 2154128 1581064 ? S<sl Oct26 17781:45
>         > /usr/bin/freeswitch -ncwait -nonat -scripts
>         /opt/commsmundi/scripts/fs
>         > root     18417  0.0  4.9 2247264 1610108 ?     SN 11:09  
>         0:00 \_
>         > /usr/bin/freeswitch -ncwait -nonat -scripts
>         /opt/commsmundi/scripts/fs
>         >
>         >
>         > what could be the cause of this? anyone experience the same?
>         >
>         > As for the service everything is running ok, is just that
>         the memory
>         > keeps increasing.. i restart freewitch when i start to reach
>         my memory
>         > limit.
>         >
>         >
>         > I'm running fs 1.8.2 on debian jessie.
>         >
>         >
>         -- 
>         Saludos / Regards / Cumprimentos
>         António Silva
>
>
>
>
>
>         ---------- Forwarded message ----------
>         From: "António Silva via FreeSWITCH-users"
>         <freeswitch-users at lists.freeswitch.org
>         <mailto:freeswitch-users at lists.freeswitch.org>>
>         To: FreeSWITCH Users Help
>         <freeswitch-users at lists.freeswitch.org
>         <mailto:freeswitch-users at lists.freeswitch.org>>
>         Cc:
>         Bcc:
>         Date: Fri, 09 Nov 2018 11:48:33 -0800 (PST)
>         Subject: Re: [Freeswitch-users] Memory increase because of
>         multiple instances of freeswitch
>         _________________________________________________________________________
>         Professional FreeSWITCH Services
>         sales at freeswitch.com <mailto:sales at freeswitch.com>
>         https://freeswitch.com
>
>         Official FreeSWITCH Sites
>         https://freeswitch.com/oss
>         https://freeswitch.org/confluence
>         https://cluecon.com
>
>         FreeSWITCH-users mailing list
>         FreeSWITCH-users at lists.freeswitch.org
>         <mailto:FreeSWITCH-users at lists.freeswitch.org>
>         http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>         UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>         https://freeswitch.com
>
-- 
Saludos / Regards / Cumprimentos
António Silva

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20181119/555234a3/attachment-0001.html>


More information about the FreeSWITCH-users mailing list