12

flask 内存回收的问题,请教下各位大佬

 3 years ago
source link: https://www.v2ex.com/t/838050
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Python

flask 内存回收的问题,请教下各位大佬

  MonTubasa · 1 天前 · 732 次点击
flask 在并发请求下,内存会逐渐上涨。

在启动的时候会声明一些全局变量,然后由定时任务发起请求更新这些全局变量,猜测是更新全局变量后造成内存泄漏。
就想问下,如何动态地去追踪这类内存泄漏
还有就是,如何在请求结束归还本次请求所占用的所有内存。

谢谢大佬们!

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK