weixin_39902875
2020-11-25 04:16 阅读 10

freeswitch ulimits

hello, I have installed freeswitch on a debian buster successfully. I have set up the ulimits in the freeswitch.service, in the /etc/profile... around everywhere but the Max open files still equals to 999999. where on earth freeswitch takes that value ?

该提问来源于开源项目:signalwire/freeswitch

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

7条回答 默认 最新

  • weixin_39902875 weixin_39902875 2020-11-25 04:16

    ` cat /usr/lib/systemd/system/freeswitch.service ;;;;; Author: Travis Cross

    [Unit] Description=freeswitch Wants=network-online.target Requires=network.target local-fs.target After=network.target network-online.target local-fs.target

    [Service] ; service Type=forking PIDFile=/run/freeswitch/freeswitch.pid Environment="DAEMON_OPTS=-nonat" Environment="USER=freeswitch" Environment="GROUP=freeswitch" EnvironmentFile=-/etc/default/freeswitch

    ExecStartPre=/usr/sbin/ethtool -G ens18 rx 32 tx 32

    ExecStartPre=/usr/sbin/ethtool -G ens19 rx 32 tx 32

    ExecStartPre=echo vegas > /proc/sys/net/ipv4/tcp_congestion_control ExecStartPre=/bin/chown -R ${USER}:${GROUP} /var/lib/freeswitch /var/log/freeswitch /etc/freeswitch /usr/share/freeswitch /var/run/freeswitch ExecStart=/usr/bin/freeswitch -u ${USER} -g ${GROUP} -ncwait ${DAEMON_OPTS} TimeoutSec=45s Restart=always ; exec ;User=${USER} ;Group=${GROUP} LimitCORE=infinity LimitNOFILE=1024000 LimitNPROC=infinity LimitSTACK=infinity LimitRTPRIO=infinity LimitRTTIME=infinity LimitMEMLOCK=infinity LimitMSGQUEUE=infinity LimitSIGPENDING=infinity IOSchedulingClass=realtime IOSchedulingPriority=2 CPUSchedulingPolicy=rr CPUSchedulingPriority=89 UMask=0007 NoNewPrivileges=false

    ; alternatives which you can enforce by placing a unit drop-in into ; /etc/systemd/system/freeswitch.service.d/*.conf: ; ; User=freeswitch ; Group=freeswitch ; ExecStart= ; ExecStart=/usr/bin/freeswitch -ncwait -nonat -rp ; ; empty ExecStart is required to flush the list. ; ; if your filesystem supports extended attributes, execute ; setcap 'cap_net_bind_service,cap_sys_nice=+ep' /usr/bin/freeswitch ; this will also allow socket binding on low ports ; ; otherwise, remove the -rp option from ExecStart and ; add these lines to give real-time priority to the process: ; ; PermissionsStartOnly=true ; ExecStartPost=/bin/chrt -f -p 1 $MAINPID ; ; execute "systemctl daemon-reload" after editing the unit files.

    [Install] WantedBy=multi-user.target `

    点赞 评论 复制链接分享
  • weixin_39683978 weixin_39683978 2020-11-25 04:16

    999999 is probably the maximum your OS allows you to set. Check /proc/sys/fs/file-max

    点赞 评论 复制链接分享
  • weixin_39902875 weixin_39902875 2020-11-25 04:16

    cat /proc/sys/fs/file-max 1024001

    Renato Gallo

    From: "Chris Rienzo" To: "signalwire/freeswitch" Cc: "renato" , "Author" Sent: Tuesday, October 15, 2019 3:42:04 PM Subject: Re: [signalwire/freeswitch] freeswitch ulimits (#60)

    Closed [ https://github.com/signalwire/freeswitch/issues/60 | #60 ] .

    — You are receiving this because you authored the thread. Reply to this email directly, [ https://github.com/signalwire/freeswitch/issues/60?email_source=notifications&email_token=AHKOEYSF2FAIJFPLSNIJK7TQOXCCZA5CNFSM4JA3XFAKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOUHCLMOY#event-2714023483 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AHKOEYTX6ZCV44UJ6VT5K2DQOXCCZANCNFSM4JA3XFAA | unsubscribe ] .

    点赞 评论 复制链接分享
  • weixin_39683978 weixin_39683978 2020-11-25 04:16

    grep for 999999 in all files within /etc/

    点赞 评论 复制链接分享
  • weixin_39902875 weixin_39902875 2020-11-25 04:16

    grep -RH 999999 /etc/

    /etc/samba/smb.conf:; idmap config YOURDOMAINHERE : range = 100000-999999 /etc/login.defs:# The values must be inside the 1000-999999999 range.

    the process has /bin/false as shell so login has nothing to do with it and I don't think samba has anything to do with it

    Renato Gallo

    From: "Chris Rienzo" To: "signalwire" Cc: "renato" , "Author" Sent: Tuesday, October 15, 2019 3:50:45 PM Subject: Re: [signalwire/freeswitch] freeswitch ulimits (#60)

    grep for 999999 in all files within /etc/

    — You are receiving this because you authored the thread. Reply to this email directly, [ https://github.com/signalwire/freeswitch/issues/60?email_source=notifications&email_token=AHKOEYTHTMXYKW3YNWIF7ZDQOXDDLA5CNFSM4JA3XFAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBI2OAA#issuecomment-542222080 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AHKOEYWJOSFLQRBRGTV5J2DQOXDDLANCNFSM4JA3XFAA | unsubscribe ] .

    点赞 评论 复制链接分享
  • weixin_39902875 weixin_39902875 2020-11-25 04:16

    can you reopen the issue now ?

    点赞 评论 复制链接分享
  • weixin_39683978 weixin_39683978 2020-11-25 04:16

    This is a system administration issue, not a freeswitch problem.

    点赞 评论 复制链接分享

相关推荐