I've been having memory leaks consistently on Apache, and it always points to this template:
PHP Fatal error: Out of memory (allocated 22806528) (tried to allocate 1245184 bytes) in /var/www/website/cache/smarty/compile/b252b2866aff75220b588b7bebd06c9aced2705a.file.product.tpl.php on line 845
Obviously it happens more often with higher traffic, and it completely blows the server away and prevents anything from being served until the processes are killed.
At first I set apache to restart every night at off-peak hours as a quick workaround. Then I cut down on the number of servers apache starts, along with child processes and MaxRequestsPerChild. Everything is set STUPID low to cut down on the number of times it happens, but it hasn't helped so far. In the last 15 minutes, the server has been forkbombed by that script three times.
The server is only 1Ghz with 512MB, but there is no reason that Apache should be eating up that much memory for the few simple sites it's running. I'm getting less than 300 hits a day to all sites combined, and it's nothing but a few VERY simple Wordpress sites along with Prestashop.
It's the same script every time.
Under the Performance tab, I've set Smarty to "never recompile," but this error keeps happening. Cache is enabled.
I'm not 100% sure how Smarty operates, so any help is appreciated.