简体   繁体   English

mod_perl内存泄漏

[英]mod_perl memory leak

I recently discovered that one of our sites has a memory leak in it, it's very strange because it happened all of the sudden. 我最近发现我们的一个网站有内存泄漏,这很奇怪,因为它突然发生了。 I've used GTop to measure the memory size per process and it tells me that the real value is somewhere around 65 MB (on the server) per request and and additional 5 MB shared. 我已经使用GTop来测量每个进程的内存大小,它告诉我每个请求的实际值大约是65 MB(在服务器上),并且共享额外的5 MB。

I tried preloading the modules in the startup.pl file a indicated in the performance tuning article for mod_perl. 我尝试在startup.pl文件中预加载mod_perl的性能调优文章中指示的模块。 Nothing happened if fact the shared memory decreased down to 3.7 MB, in this situation I thought that my application is leaking memory do before any line of code got executed I measured the memory just to find out that the total value is in fact 64 MB, my questions are: Is there a default preallocation of memory for each process? 如果事实上共享内存减少到3.7 MB没有发生,在这种情况下我认为我的应用程序在任何代码行执行之前泄漏内存我测量内存只是为了发现总值实际上是64 MB,我的问题是:每个进程都有默认的内存预分配吗? Is there a configuration issue? 有配置问题吗? Is mod_perl leaking memory ? mod_perl泄漏内存吗?

Thank you very much. 非常感谢你。

This is probably a question that's better asked on the mod_perl mailing list. 这可能是一个在mod_perl邮件列表上更好问的问题。 There are too many variables (versions of perl/mod_perl/apache, what modules you're loading, what OS you're running, what MPM, apache configuration, etc) involved here to really help in a Q/A forum like this, since there is not "right" answer. 有太多的变量(perl / mod_perl / apache的版本,你正在加载什么模块,你正在运行什么操作系统,什么是MPM,apache配置等)来帮助像这样的Q / A论坛,因为没有“正确”的答案。

在mod_perl中,您可以使用核心exit()函数导致内存泄漏

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM