0

I am trying to setup APC for my magento store running on a dedicated server with 12GB RAM running litespeed.

I am using he suggested settings from the Rackspace-Magento Whitepage

extension=apc.so
apc.shm_size=256M
apc.num_files_hint=10000
apc.user_entries_hint=10000
apc.max_file_size=5M

I get:

Fatal error: Out of memory (allocated 61341696) (tried to allocate 82 bytes) in /home/bpadmin/public_html/lib/Zend/Db/Statement/Pdo.php on line 290

when I try to load a top level category page. Other pages load fine, but the categories with the most products all produce the same error.

However, if I reduce apc.shm_size to 128M it loads perfectly.

PHP memory_limit was 512M when I started this, but I've since raised to the 1024M. But that doesn't stop the error.

I have seen suggestions around the net to disable suExec and so I have. But the error persist.

Likewise, it's been suggested to increase the litespeed Soft and Hard Memory Limits so I increased them from 300/400 to 500/600 but that didn't help either.

Does anyone know anything else that could be causing this?

ben
  • 189
  • 1
  • 1
  • 8

2 Answers2

2

Memory problems usually happen for one of two reasons.

1.Repeated loading of something in a loop without clearing memory from the previous loop

2.Loading something too large

You can try the following:

1.Try to clear apc cache by restarting apache service or use apc.php file to clear opcode cache 2.Increase your memory limit from php.ini

memory_limit = ...

3.Check the value of memory limit with phpinfo

php phpinfo();

Innovator
  • 507
  • 2
  • 11
0

check out kernel.shmmax in sysctl by defautl, shmmax is much lower than 256MB, so maybe that's why its oom'ing.