Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 986
lollo64 Avatar asked Dec 23 '13 14:12

lollo64


People also ask

How do I fix fatal error allowed the memory size of 134217728 bytes exhausted?

The correct way is to edit your php. ini file. Edit memory_limit to your desire value. As from your question, 128M (which is the default limit) has been exceeded, so there is something seriously wrong with your code as it should not take that much.

How do I fix fatal error allowed memory size?

This usually happens when hosting a high-traffic and big websites using small shared hosting servers, which allocate very little amounts of PHP memory per each hosting plan. To fix the error, you have to manually increase the default PHP memory limit set for your server.

How do I resolve out of memory error in PHP?

Simple — increase the memory limit programmatically early on in your code, before your process runs out of memory. If you do it this way, you can give PHP extra memory only when that piece of code gets called rather than increasing the memory limit for all PHP processes.


2 Answers

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

like image 66
corzoit Avatar answered Oct 12 '22 23:10

corzoit


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.

like image 31
Derek Gogol Avatar answered Oct 12 '22 23:10

Derek Gogol