I have a really strange problem and I dont know how to solve it. My application reaches memory limit from time to time and Internal server error 500 happens. I have limit of 570MB on shared hosting. I tried to debug my application and YiiDebug Toolbar shows that every page is consuming about 10-12MB of memory. I dont really get where is the problem. On my local wamp server, there are no problems.
Can anyone help me? At least tell me where to start looking for memory leaks because I dont see any obvious.
This is unpredictable problem, it does not happen on some particular request.
I already commented ‘YII_DEBUG’ line in index.php.
If you’ve got a lot of AR records, you might also look into the brand new CActiveDataProviderIterator that just landed on master. It’s not part of a stable Yii release yet and there is little documentation (I’m helping work on that now actually). But could be a place where you’re hitting some memory limits.
And are you using GiiX by any change? I’ve found it’s fairly inefficient in some places, leading to the need to query more leanly …