<p>If your plugin is pulling in a lot of data, then most likely you're just bumping into your php.ini file's <a href="http://php.net/manual/en/ini.core.php#ini.memory-limit" rel="nofollow">memory_limit</a> setting.  Try bumping that up to 256M and see if that helps.</p>

CC BY-SA 3.0
2014-09-25T08:12:15.937Z
Thanks Brad, I'll have to talk to the host and see if I can increase it. 134mb is already a hell of a lot though and the site's only been live for a month. It's going to increase by another hundred entries every month. Would pagination stop the overhead?
darylknight
CC BY-SA 3.0
2014-09-25T14:36:07.337Z
Maybe? Caching would likely be the first place to look, but it's hard to tell without seeing how your data is organized and your plugin code and what it's doing.
Brad Bell
CC BY-SA 3.0
2014-09-25T15:04:35.497Z
I tried caching the data to reduce the overhead but it was causing issues - you advised me that caching was never designed to be used inside the control panel :)
darylknight
CC BY-SA 3.0
2014-09-25T15:19:49.977Z
The {% cache %} tag wasn't,  but there are other ways of caching
Brad Bell
CC BY-SA 3.0
2014-09-23T19:46:32.043Z
2014-09-23T19:46:32.043Z
Brad Bell
<p>I have a template in my control panel (technically a plugin, but it's just one template) which is running out of memory:</p>

<blockquote>
  <p>Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
  to allocate 78 bytes) in
  /var/sites/t/thames-arbitrators.org.uk/craft/app/helpers/ModelHelper.php
  on line 101</p>
</blockquote>

<p>In my local dev site, the profiler is giving me the following info:</p>

<ul>
<li>Time 10.66053s</li>
<li>Memory: 127,544Kb</li>
<li>Total Queries: 381</li>
</ul>

<p>Is there anything I can do to alleviate this? I've seen the answer to '<a href="https://craftcms.stackexchange.com/questions/1323/php-fatal-error-allowed-memory-size-of-x-bytes-exhausted">PHP Fatal error: Allowed memory size of X bytes exhausted</a>' but there are only two conditionals in this template, it's almost certainly down to the fact that I need to return several hundred entries.</p>

<p>I don't mind posting my template here but there's a big table in it so it's going to make the page super long - let me know which bits you need.</p>

CC BY-SA 3.0
2014-09-23T09:00:58.857Z
Hi, we have the same issue on a entries template in the admin. Looks like the UserSessionService::getAuthTimeout() is using an abnormal amount of requests. Need a patch ASAP!
Dan G
CC BY-SA 3.0
2014-09-23T19:45:24.757Z
@DanG Your issue is most likely different and should be addressed in the next release.
Brad Bell
CC BY-SA 3.0
2014-09-23T20:02:51.823Z
@BradBell Thanks, and thanks for the update!
Dan G
<entries><php>
Fatal error: Allowed memory size of 134mb exhausted
# Fatal error: Allowed memory size of 134mb exhausted

(Asked by: username_0 on 2014-09-23)

I have a template in my control panel (technically a plugin, but it's just one template) which is running out of memory:

> Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
> to allocate 78 bytes) in
> /var/sites/t/thames-arbitrators.org.uk/craft/app/helpers/ModelHelper.php
> on line 101

In my local dev site, the profiler is giving me the following info:

* Time 10.66053s
* Memory: 127,544Kb
* Total Queries: 381

Is there anything I can do to alleviate this? I've seen the answer to '[PHP Fatal error: Allowed memory size of X bytes exhausted](https://craftcms.stackexchange.com/questions/1323/php-fatal-error-allowed-memory-size-of-x-bytes-exhausted)' but there are only two conditionals in this template, it's almost certainly down to the fact that I need to return several hundred entries.

I don't mind posting my template here but there's a big table in it so it's going to make the page super long - let me know which bits you need.

**Tags:** entries, php

> **Comments:**
> **username_1**: Hi, we have the same issue on a entries template in the admin. Looks like the UserSessionService::getAuthTimeout() is using an abnormal amount of requests. Need a patch ASAP!  
> **username_2**: @DanG Your issue is most likely different and should be addressed in the next release.  
> **username_1**: @BradBell Thanks, and thanks for the update!  

---

## 1 answers

### Answer by username_2 on 2014-09-23. Score: 4 | Accepted answer

If your plugin is pulling in a lot of data, then most likely you're just bumping into your php.ini file's [memory\_limit](http://php.net/manual/en/ini.core.php#ini.memory-limit) setting. Try bumping that up to 256M and see if that helps.

> **Comments:**
> **username_0**: Thanks Brad, I'll have to talk to the host and see if I can increase it. 134mb is already a hell of a lot though and the site's only been live for a month. It's going to increase by another hundred entries every month. Would pagination stop the overhead?  
> **username_2**: Maybe? Caching would likely be the first place to look, but it's hard to tell without seeing how your data is organized and your plugin code and what it's doing.  
> **username_0**: I tried caching the data to reduce the overhead but it was causing issues - you advised me that caching was never designed to be used inside the control panel :)  
> **username_2**: The {% cache %} tag wasn't,  but there are other ways of caching  

---

