ruby-on-rails - Unicorn Worker 进程下的大量 diagnostic_context 线程
问题描述
我们在每个 Unicorn 工作进程下都有越来越多的 diagnostic_context 线程:
PID:23419 Has 21669 Threads. Process info: unicornworker[0]-c/etc/unicorn/web.rbproduction-D
PID:23422 Has 19681 Threads. Process info: unicornworker[1]-c/etc/unicorn/web.rbproduction-D
PID:23425 Has 22521 Threads. Process info: unicornworker[2]-c/etc/unicorn/web.rbproduction-D
PID:23428 Has 18545 Threads. Process info: unicornworker[3]-c/etc/unicorn/web.rbproduction-D
这是其中一位工作人员的一些线程列表:
PID SPID TTY TIME CMD
23422 23422 ? 00:02:29 ruby
23422 23424 ? 00:00:00 ruby-timer-thr
23422 27362 ? 00:00:00 diagnostic_con*
23422 27363 ? 00:00:00 diagnostic_con*
23422 27379 ? 00:00:00 diagnostic_con*
23422 27380 ? 00:00:00 diagnostic_con*
23422 27392 ? 00:00:00 diagnostic_con*
23422 27393 ? 00:00:00 diagnostic_con*
23422 27404 ? 00:00:00 diagnostic_con*
在这一点上,增加 Unicorn 的 TaskMax 是权宜之计。为什么会产生这些进程,我们如何防止产生如此大量的进程?
解决方案
推荐阅读
- android-studio - 如何在颤动中禁用自动 TODO 评论?
- algorithm - 在迷宫中使用曼哈顿距离的广度优先搜索与 A*
- c - 如何在 C 中的 char 数组中更改位图的一位?
- linux - -bash: dir: command not found - 如何恢复linux的基本命令
- python - TypeError: search_country() 接受 0 个位置参数,但给出了 1 个
- javascript - Javascript回调不能在变量中赋值
- flutter - 从子项弹出时,根小部件未重建
- javascript - 如何在中心而不是顶部开始滚动(溢出-y:滚动)div?
- android - NotificationCompat - 无法阻止重新启动
- sql-server - 用于 SQL Server 的 Oracle 函数交换