docker中运行discourse经常崩溃


(Yedward) #1

通过官方提供的:https://github.com/discourse/discourse_docker 方式成功在docker中安装运行了discourse,运行过程中时不时会突然崩溃,详细报错信息如下:

run-parts: executing /etc/runit/1.d/00-ensure-links
run-parts: executing /etc/runit/1.d/00-fix-var-logs
run-parts: executing /etc/runit/1.d/anacron
run-parts: executing /etc/runit/1.d/cleanup-pids
Cleaning stale PID files
run-parts: executing /etc/runit/1.d/copy-env
run-parts: executing /etc/runit/1.d/enable-brotli
Started runsvdir, PID is 36
rsyslogd: command 'KLogPermitNonKernelFacility' is currently not permitted - did you already set it via a RainerScript command (v6+ config)? [v8.16.0 try http://www.rsyslog.com/e/2222 ]
rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
rsyslogd: activation of module imklog failed [v8.16.0 try http://www.rsyslog.com/e/2145 ]
rsyslogd: Could not open output pipe '/dev/xconsole':: No such file or directory [v8.16.0 try http://www.rsyslog.com/e/2039 ]
supervisor pid: 43 unicorn pid: 57
Shutting Down
run-parts: executing /etc/runit/3.d/01-nginx
ok: down: nginx: 0s, normally up
run-parts: executing /etc/runit/3.d/02-unicorn
exiting
ok: down: unicorn: 1s, normally up
When using programs that use GNU Parallel to process data for publication please cite:

  O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
  ;login: The USENIX Magazine, February 2011:42-47.

This helps funding further development; and it won't cost you a cent.
Or you can get GNU Parallel without this requirement by paying 10000 EUR.

To silence this citation notice run 'parallel --bibtex' once or use '--no-notice'.

ok: down: nginx: 1s, normally up
ok: down: unicorn: 1s, normally up
ok: down: cron: 0s, normally up
ok: down: rsyslog: 0s, normally up
run-parts: executing /etc/runit/1.d/00-ensure-links
run-parts: executing /etc/runit/1.d/00-fix-var-logs
run-parts: executing /etc/runit/1.d/anacron
run-parts: executing /etc/runit/1.d/cleanup-pids
Cleaning stale PID files
run-parts: executing /etc/runit/1.d/copy-env
run-parts: executing /etc/runit/1.d/enable-brotli
Started runsvdir, PID is 31
rsyslogd: command 'KLogPermitNonKernelFacility' is currently not permitted - did you already set it via a RainerScript command (v6+ config)? [v8.16.0 try http://www.rsyslog.com/e/2222 ]
rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
rsyslogd: activation of module imklog failed [v8.16.0 try http://www.rsyslog.com/e/2145 ]
rsyslogd: Could not open output pipe '/dev/xconsole':: No such file or directory [v8.16.0 try http://www.rsyslog.com/e/2039 ]
supervisor pid: 37 unicorn pid: 52
config/unicorn_launcher: line 44: kill: (52) - No such process
config/unicorn_launcher: line 10: kill: (52) - No such process
exiting
supervisor pid: 75 unicorn pid: 78
config/unicorn_launcher: line 44: kill: (78) - No such process
config/unicorn_launcher: line 10: kill: (78) - No such process
exiting
supervisor pid: 101 unicorn pid: 104
config/unicorn_launcher: line 44: kill: (104) - No such process
config/unicorn_launcher: line 10: kill: (104) - No such process
exiting
supervisor pid: 127 unicorn pid: 130
config/unicorn_launcher: line 44: kill: (130) - No such process
config/unicorn_launcher: line 10: kill: (130) - No such process
exiting
supervisor pid: 153 unicorn pid: 156
config/unicorn_launcher: line 44: kill: (156) - No such process
config/unicorn_launcher: line 10: kill: (156) - No such process
exiting
supervisor pid: 179 unicorn pid: 182
config/unicorn_launcher: line 44: kill: (182) - No such process
config/unicorn_launcher: line 10: kill: (182) - No such process
exiting
supervisor pid: 205 unicorn pid: 208
config/unicorn_launcher: line 44: kill: (208) - No such process
config/unicorn_launcher: line 10: kill: (208) - No such process
exiting
supervisor pid: 231 unicorn pid: 234
config/unicorn_launcher: line 44: kill: (234) - No such process
config/unicorn_launcher: line 10: kill: (234) - No such process
exiting
supervisor pid: 257 unicorn pid: 260
config/unicorn_launcher: line 44: kill: (260) - No such process
config/unicorn_launcher: line 10: kill: (260) - No such process
exiting
supervisor pid: 283 unicorn pid: 286
config/unicorn_launcher: line 44: kill: (286) - No such process
config/unicorn_launcher: line 10: kill: (286) - No such process
exiting
supervisor pid: 309 unicorn pid: 312
Shutting Down
run-parts: executing /etc/runit/3.d/01-nginx
ok: down: nginx: 0s, normally up
run-parts: executing /etc/runit/3.d/02-unicorn
config/unicorn_launcher: line 10: kill: (312) - No such process
exiting
ok: down: unicorn: 0s, normally up
When using programs that use GNU Parallel to process data for publication please cite:

  O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
  ;login: The USENIX Magazine, February 2011:42-47.

This helps funding further development; and it won't cost you a cent.
Or you can get GNU Parallel without this requirement by paying 10000 EUR.

To silence this citation notice run 'parallel --bibtex' once or use '--no-notice'.

ok: down: nginx: 1s, normally up
ok: down: unicorn: 1s, normally up
ok: down: cron: 0s, normally up
ok: down: rsyslog: 0s, normally up
run-parts: executing /etc/runit/1.d/00-ensure-links
run-parts: executing /etc/runit/1.d/00-fix-var-logs
run-parts: executing /etc/runit/1.d/anacron
run-parts: executing /etc/runit/1.d/cleanup-pids
Cleaning stale PID files
run-parts: executing /etc/runit/1.d/copy-env
run-parts: executing /etc/runit/1.d/enable-brotli
Started runsvdir, PID is 31
rsyslogd: command 'KLogPermitNonKernelFacility' is currently not permitted - did you already set it via a RainerScript command (v6+ config)? [v8.16.0 try http://www.rsyslog.com/e/2222 ]
rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
rsyslogd: activation of module imklog failed [v8.16.0 try http://www.rsyslog.com/e/2145 ]
rsyslogd: Could not open output pipe '/dev/xconsole':: No such file or directory [v8.16.0 try http://www.rsyslog.com/e/2039 ]
supervisor pid: 36 unicorn pid: 52
Reopening logs

主机的CPU、内存很充裕,4核16G,CentOS 7系统,docker版本17.06.2-ce。


(雪莱鸟) #2

:rofl:
服务器好牛逼!


(Yedward) #3

还有其他服务部署在上面,不过,discourse这个应该不是内存不够等问题


(Erick Guan) #4

shared/standalone/var/log 里的 logs 是什么?unicorn_stderr.log, production*.log 还有系统日志。docker logs 不重要


(咖啡白菊) #5

这个问题我早就遇到过,如果访问量很大,那么一天可能出现几次系统重启,导致每次10分钟左右打不开。我不知道具体原因。我重装过几次系统,问题依旧会重现。

目前官方连中文搜索也没有修复,已经几个月了。但估计与这个应该没多大关系吧。

我内核、内存、和磁盘都足够强大,使用不到10%


(DaBin) #6

一开始在配置 app.xml 的时候是可以选择 discourse 运行内存的, 包括 worker 设置多个,如果访问量很大的话,可以提高一下这两个属性。


(Yedward) #7

内测环境,每天都不到10个人访问,可是还经常崩,哎


(青草mc) #8

同感,discourse太吃配置了


(雪莱鸟) #9

不过,稳定性很棒,还有是开发进度还是蛮给力的