简体   繁体   中英

Locating a cross-server memory leak

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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