Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CActiveRecord::find/find/findbysql and most other finds eat memory #47

Closed
qiangxue opened this issue Feb 15, 2012 · 1 comment
Closed

Comments

@qiangxue
Copy link
Member

What steps will reproduce the problem?

  1. Do anytype of 'find' over 1500 times and -out of memory- if allowed
    memory=16MB. Specific example is here:
    $model=Account::model()->find('code=:code AND companyId=:companyId',
    array(':code'=>$accountCode,':companyId'=> $companyId));
  2. Have tried all the different find functions in CActiveRecord with the
    same result. Even going to queryScaler does the crash.
    3.

What is the expected output? What do you see instead?
The error I get is typically(varies):
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 72 bytes) in /var/www/yii/framework/db/CDbCommand.php on line 115

What version of the product are you using? On what operating system?
1.10 RC 1 January 1

Please provide any additional information below.

Migrated from http://code.google.com/p/yii/issues/detail?id=781


earlier comments

qiang.xue said, at 2010-01-03T01:37:09.000Z:

Please try it with higher memory limit, such as 32MB. The size 16MB is a bit small if you have enabled many PHP extensions. We have tested the similar function call before without observing any memory leak issue.

dormlock said, at 2010-01-03T02:19:27.000Z:

If your using i think it was XAMPP on Mac OS X there was a bug that would cause this type of problem. I was going to convert my windows and mac development servers to XAMPP before I discovered the bug in the Mac version. increasing the memory didn't help and the problem was actually related to the memory for threads in MySQL. You could change the memory allocated to the threads but the value was never respected and seemed to have a hard coded value it used.

alexander.makarow said, at 2010-06-15T22:29:45.000Z:

Should be solved by http://code.google.com/p/yii/source/detail?r=2196

qiang.xue said, at 2012-02-15T18:36:29.000Z:

Migrated to http://github.com//issues/7

@samdark
Copy link
Member

samdark commented Feb 16, 2012

This one was in fixed status at google code.

@samdark samdark closed this as completed Feb 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants