Supervisord 在 2 分钟后为 asyncio (python) 任务发送 SIGKILL [英] Supervisord sending SIGKILL for an asyncio (python) task after 2 minutes

查看:54
本文介绍了Supervisord 在 2 分钟后为 asyncio (python) 任务发送 SIGKILL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在 python 中使用 Quart 和 asyncio 构建的 api.端点生成一个至少运行 5 分钟的后台任务,但 Supervisord 为该任务发送 SIGKILL 命令并在中途终止它.

I have an api built using Quart and asyncio in python. An endpoint generates a background task which would run for 5 minutes atleast but Supervisord send SIGKILL command for that task and terminates it midway.

我看不出为什么 supervisord 会杀死它.

I don't see any reason why supervisord would kill it.

日志:

2020-05-06 09:37:53,791 INFO supervisord started with pid 9
2020-05-06 09:37:54,794 INFO spawned: 'web-app' with pid 12
2020-05-06 09:37:54,795 INFO spawned: 'push-service' with pid 13
2020-05-06 09:37:55,797 INFO success: web-app entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-05-06 09:38:11,614 INFO success: push-service entered RUNNING state, process has stayed up for > than 16 seconds (startsecs)
2020-05-06 09:46:48,389 INFO exited: web-app (terminated by SIGKILL; not expected)
2020-05-06 09:46:49,393 INFO spawned: 'web-app' with pid 63
2020-05-06 09:46:50,394 INFO success: web-app entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

这里有什么问题?

推荐答案

任务内存过大,容器内存不足,任务中途终止.

The task was memory heavy and container didn't have enough memory so the task was getting killed halfway.

向容器添加更多内存解决了该问题.

Adding more memory to container resolved the issue.

这篇关于Supervisord 在 2 分钟后为 asyncio (python) 任务发送 SIGKILL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆