cancel
Showing results for 
Search instead for 
Did you mean: 

Pdo.php trying to allocate too much RAM?

Pdo.php trying to allocate too much RAM?

So today our magento site, crashed and after enabling error reporting, we got this:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 16384 bytes) in /public_html/lib/Zend/Db/Statement/Pdo.php on line 228

 

Any ideas what can cause this? 

8 REPLIES 8

Re: Pdo.php trying to allocate too much RAM?

Hi @leokan23 

May be re-indeing is taking too much memory.

What is your current memory set on the server for PHP?

For now, you can increase and debug more if any collection is tasking too long time to process.


Add following line in index.php.

ini_set("memory_limit","-1"); 

If it will not work then you need to increase from the server.

I hope it will help.

Re: Pdo.php trying to allocate too much RAM?

We have 16gb ram on this server (we run both php and mysql on the same server).

This is my php.ini 

realpath_cache_size = 32k
realpath_cache_ttl = 7200
max_execution_time = 18000
max_input_time = 18000
memory_limit = 1024M
default_socket_timeout = 90
pdo_mysql.cache_size = 2000
output_buffering = 4096
upload_max_filesize = 32M
post_max_size = 32M

Re: Pdo.php trying to allocate too much RAM?

@leokan23 

It is not RAM issue on the server.

you need to increase memory_limit on the server.

memory_limit = 1024M

to

memory_limit = 4096M

at least..

Then check.

Re: Pdo.php trying to allocate too much RAM?

I have changed this to 4gb. I hope we won't have any more troubles.

I also went on and cleaned the database (huge core_url_rewrite table), which might affect this.

Re: Pdo.php trying to allocate too much RAM?

Yes, may url indexing is consuming more memory.

Re: Pdo.php trying to allocate too much RAM?

Strange...
Please have a look into below url, it may help you.

https://magento.stackexchange.com/questions/167862/php-memory-limit

Re: Pdo.php trying to allocate too much RAM?

@leokan23 
Did it work for you? if, yes.. then please accept as a solution, so  it will help to others as well.

Re: Pdo.php trying to allocate too much RAM?

Hi@leokan23,

Any news on this issue?