我正在尝试配置一个主管来控制FreeSWITCH。下面是supervisord.conf中当前的配置。
[program:freeswitch]
command=/usr/local/freeswitch/bin/freeswitch -nc -u root -g root
numprocs=1
stdout_logfile=/var/log/supervisor/freeswitch.log
stderr_logfile=/var/log/supervisor/freeswitch.log
autostart=true
autorestart=true
startsecs=10
; Need to wait for currently executing tasks to finish at shutdown.
; Increase this if you have very long running tasks.
stopwaitsecs = 600
; When resorting to send SIGKILL to the program to terminate it
; send SIGKILL to its whole process group instead,
; taking care of its children as well.
killasgroup=true当我使用supervisord命令启动主管时,它将启动freeswitch进程,而不会出现任何错误。但是,当我试图使用supervisorctl命令重新启动freeswitch时,它不能工作,并给出以下错误。
freeswitch: ERROR (not running)
freeswitch: ERROR (abnormal termination)我无法看到日志(/var/log/var/freeswitch.log)中报告的任何错误。然而,我看到以下情况:
1773 Backgrounding.
1777 Backgrounding.
1782 Backgrounding.它似乎开始了三个过程的自由。这样做不对吗?
有人能指出这里的问题吗?如果需要,可以提供正确的配置吗?
发布于 2014-08-29 04:41:48
supervisor要求运行的程序不分后台;毕竟,创建它是为了作为后台运行那些程序,而这些程序是不可行的,或者很难使代码正确地去功能化。因此,对于与主管一起运行的每个程序,请确保它不会在后台分叉。
在freeswitch的情况下,只需删除-nc选项,使其在前台运行;主管将适当地引导标准流,并在进程崩溃时重新启动进程。
发布于 2017-06-14 16:44:33
请记住,进程继承父进程的ulimits值,因此在您的情况下,freeswitch将以与其父进程监管相同的ulimits运行。我不认为这是你想要的一个资源密集型的应用程序,如freeswitch,这说使用supervisord与freeswitch实际上是一个非常糟糕的想法。如果您必须坚持它,那么您将不得不在文档中找到如何提高所有用于监督的ulimit值。
https://stackoverflow.com/questions/25419214
复制相似问题