Yii Framework Forum: Allowed Memory Size Exhausted - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Allowed Memory Size Exhausted Rate Topic: -----

#1 User is offline   alokj 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 19-March 14

Posted 19 March 2014 - 05:07 AM

I am continuously getting allowed memory size exhausted error at my yii application (version 1.1.13). Below are the files with line no where I am getting the issue -

1. base/CModule.php on line 103

100: public function __get($name)
101: {
102: if($this->hasComponent($name))
103: return $this->getComponent($name);
104: else
105: return parent::__get($name);
106: }

2. web/auth/CWebUser.php on line 567

565: public function getState($key,$defaultValue=null)
566: {
567: $key=$this->getStateKeyPrefix().$key;
568: return isset($_SESSION[$key]) ? $_SESSION[$key] : $defaultValue;
569: }


I set the memory limit to 512M & 1GB, but its not resolving the issue.

Please Help!!!
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,727
  • Joined: 17-January 09
  • Location:Russia

Posted 19 March 2014 - 06:38 AM

Are you reading a lot of AR models?
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#3 User is offline   alokj 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 19-March 14

Posted 20 March 2014 - 06:14 AM

View Postsamdark, on 19 March 2014 - 06:38 AM, said:

Are you reading a lot of AR models?


We have lot of AR models in our application but we are reading only few. For more information we are getting the error few times at staging server only (ubuntu) and even at the login page where we are reading only 3 AR models. At our local environment (windows with 512MB memory limit) its working fine without any memory issue.

We have set the import path at our application config file for all AR models that I believe is for autoloading only.
0

#4 User is offline   alokj 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 19-March 14

Posted 20 March 2014 - 01:45 PM

View Postsamdark, on 19 March 2014 - 06:38 AM, said:

Are you reading a lot of AR models?


Attaching the wincachegrind screenshot, its showing that the CModule->getComponent is getting called 91 times.

Attached File(s)


0

#5 User is offline   alokj 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 19-March 14

Posted 24 March 2014 - 09:34 AM

View Postalokj, on 20 March 2014 - 01:45 PM, said:

Attaching the wincachegrind screenshot, its showing that the CModule->getComponent is getting called 91 times.


We tracked the fatal error and found that the out of memory issue is occurring during the initialization of yii - 'user' component. I am using allowAutoLogin for user component configuration.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users