dongsu0308 2014-12-13 22:49
浏览 43
已采纳

找到跨服务器内存泄漏

I have a social network based on elgg open source platform (PHP) and I've been having some memory related problems with it.

Fatal error: Allowed memory size of 12582912 bytes exhausted (tried to allocate 23456789 bytes) in somefile.php

My web application architecture contains 2 apache web servers (linux) with a load balancer between them. about 3-4 times a day the web application collapses and it takes about 2-3 mins for it to go back up again by its own. Knowingly this is just a patch (an ugly one as well) I upgraded the memory on both of the servers and I updated the php.ini to memory_limit = 512M. I know i still need to locate the memory leak but i just wanted to see how bad was it, and to see if it actually helps.

My real question is: since i have two web servers running the code, how come the entire application collapse and not just one of the servers each time?

Thanks in advance, Itay

  • 写回答

1条回答 默认 最新

  • doujia4619 2015-03-21 19:54
    关注

    In this case the problem was that the settings in the .htaccess file were overriding the php.ini.

    I figured it out thanks to Pawel Sroka's comment.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置