PhpMyAdmin | Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate xxxxxx bytes) in Unknown on line 0

16,415

Solution 1

I realize this is an old question, but I started having the same issue today on Apache running on a Linode virtual server. In my case, the solution was simply to enable Zend Opcache. It was disabled due to an error in one of the ini files in '/etc/php5/apache2/conf.d/' directory.

I was getting intermittent errors, where most of the time pages and images would load just fine, but once in a while they would fail. Images would be broken and instead of seeing a page I would get "connection error".

These are some additional errors I was seeing in the Apache's error.log file:

[core:notice] [pid 8186] AH00052: child pid 9008 exit signal Segmentation fault (11)
[core:notice] [pid 8186] AH00052: child pid 9007 exit signal Aborted (6)
*** Error in `/usr/sbin/apache2': free(): invalid pointer: 0x00007f56840b63c0 ***

and of course the infamous:

[:error] [pid 8829] [client nnn.nnn.nnn.n:24471] PHP Fatal error:
  Allowed memory size of 134217728 bytes exhausted (tried to 
  allocate 94008222532912 bytes) in Unknown on line 0, referer:
  https://www.mysiteurlhere.com/node/page

After enabling zend opcache, there are no more errors in error.log, and everything works as it should.

Solution 2

Don't use 128MB use 128M, seriously, try it.

Solution 3

Do this in your php script,

ini_set('memory_limit', '-1');  // -1 here implies no limit, you can even set it to a bigger number like '192M' for 192Mb space.

This will override the default memory limit.

This question has already been answered many times.

Share:
16,415
lollo64
Author by

lollo64

Updated on July 07, 2022

Comments

  • lollo64
    lollo64 almost 2 years

    I'm tying to find the cause of this error but I'm failing. I've have installed PhpMyAdmin on my server and right now on the footer of every page I'm getting this error:

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10934248 bytes) in Unknown on line 0

    As you can see I've tried di upgrade the memory_limit (from 2MB to 128MB) but I still getting this error. Right now it appears every time I login in PhpMyAdmin console, also if I don't do any opertation. Do you have any suggestion?

    I've tried to follow some answer that I find on the web, but no one seems to resolve the problem. Also I can't find the file that throw the error becasue it's "Unknow" and I can't understand who is asking for such quantity of memory.