Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 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();

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.