thinkpozzitive Posted July 21, 2009 Share Posted July 21, 2009 Hi. I'm experiencing some very strange memory issues with my php script. maybe some of you have runned into this before and can help me sort out why this is happening. I have a php script that basically runs continuously but it has various sleeps and therefore is inactive some of the time. The problem with it is that it gathers over time a lot of garbage and memory consumption grows to unacceptable levels. Therefore I've tried to do my best and unset all possible variables , arrays, etc when exiting a function and so on. The result is pretty interesting. The script still builds up memory, however since I'm running it on Windows with a Wamp enabled server, if I do an operation of minimizing or maximizing the command line window, the memory is magically cleaned up. However this only happens by human intervention (which means i have to maximize, minimize, the command line window). This behaviour seems to me to be very strange, and i can't wrap my head around the fact that memory isn't cleaned when the process is in a sleep state, and further more the memory is cleaned up when I minimize/maximize the command line window. Now, since this almost science fiction problem has been bugging me, please , if you can, help me sort it out. Also if anyone has knowledge about this problem acctually happening on windows, but not on linux bases operating system ... please do tell. Also let me know weather it's an php.ini config issue, or what not. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/166771-php-in-command-line-and-memory-problem/ Share on other sites More sharing options...
ignace Posted July 21, 2009 Share Posted July 21, 2009 Read this: http://www.tuxradar.com/practicalphp/18/1/10 Quote Link to comment https://forums.phpfreaks.com/topic/166771-php-in-command-line-and-memory-problem/#findComment-879387 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.