2.14 尝试解决内存泄漏问题

This commit is contained in:
zy123 2025-02-14 16:05:33 +08:00
parent 979d7fac21
commit 0aa507d465

View File

@ -30,7 +30,7 @@ def create_app():
end_fd = os.listdir('/proc/self/fd')
leaked = set(end_fd) - set(g.start_fd)
if leaked:
logger.warning(f"潜在FD泄漏: {len(leaked)}个未关闭")
logger.info(f"潜在FD泄漏: {len(leaked)}个未关闭")
# @app.teardown_request
# def teardown_request(exception):
# # 接口请求之后都会执行该代码,做一些清理工作