My magento instance stops working a few minutes after i restart my server. For the first few minutes, everything is happy. I can place orders and the site is flawless, however, after a few minutes of being online it starts to break down. The symptoms are being unable to add an item to the cart, unable to log in or unable to check out. The site loads and all displays as normal (you can browse the store, etc) but when you try to take any action it fails (Adding an item to the cart takes you to the "My Cart" page, but the cart is emptry, for example).
I should mention that this instance has been running for years without issue and that this is a recent problem that has crept up.
If i look at my server logs i see a few errors. The following is the entire error log from the time of the server restarting to when it started crashing.
2014/07/15 08:36:05 [error] 761#0: *11 access forbidden by rule, client: 108.166.89.201, server: mydomain.com, request: "POST /app/etc/local.xml HTTP/1.1", host: "mydomain.com"
2014/07/15 08:36:16 [error] 761#0: *37 access forbidden by rule, client: 108.166.89.201, server: mydomain.com, request: "POST /app/etc/local.xml HTTP/1.1", host: "mydomain.com"
2014/07/15 08:36:41 [error] 761#0: *75 FastCGI sent in stderr: "PHP Fatal error: Call to undefined method OnePica_ImageCdn_Helper_Image::directResize() in /var/www/mydomain.com/public_html/app/design/frontend/default/siteName/template/catalog/product/list.phtml on line 111" while reading response header from upstream, client: 66.249.69.56, server: mydomain.com, request: "GET /clearance.html?%2Fclearance_html=&cat=190&dir=asc&mode=grid&order=name HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomain.com"
2014/07/15 08:36:51 [error] 761#0: *88 FastCGI sent in stderr: "PHP Fatal error: Class 'Mage' not found in /var/www/mydomain.com/public_html/app/code/core/Mage/Core/functions.php on line 244" while reading upstream, client: clientIp, server: mydomain.com, request: "GET /index.php/checkout/onepage/progress/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomain.com", referrer: "https://mydomain.com/index.php/checkout/onepage/"
2014/07/15 08:36:54 [error] 761#0: *92 FastCGI sent in stderr: "PHP Fatal error: Class 'Mage' not found in /var/www/mydomain.com/public_html/app/code/core/Mage/Core/functions.php on line 244" while reading upstream, client: clientIp, server: mydomain.com, request: "POST /index.php/checkout/onepage/saveShippingMethod/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomain.com", referrer: "https://mydomain.com/index.php/checkout/onepage/"
2014/07/15 08:36:55 [error] 761#0: *94 FastCGI sent in stderr: "PHP Fatal error: Class 'Mage' not found in /var/www/mydomain.com/public_html/app/code/core/Mage/Core/functions.php on line 244" while reading upstream, client: clientIp, server: mydomain.com, request: "GET /index.php/checkout/cart/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomain.com"
2014/07/15 08:37:00 [error] 761#0: *96 FastCGI sent in stderr: "PHP Fatal error: Class 'Mage' not found in /var/www/mydomain.com/public_html/app/code/core/Mage/Core/functions.php on line 244" while reading upstream, client: clientIp, server: mydomain.com, request: "GET /index.php/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomain.com", referrer: "http://mydomain.com/index.php/checkout/cart/"
2014/07/15 08:37:06 [error] 761#0: *105 FastCGI sent in stderr: "PHP Fatal error: Class 'Mage' not found in /var/www/mydomain.com/public_html/app/code/core/Mage/Core/functions.php on line 244" while reading upstream, client: clientIp, server: mydomain.com, request: "GET /index.php/clearance/spin-match/fun-on-the-farm-1.html HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomain.com", referrer: "http://mydomain.com/index.php/"
2014/07/15 08:37:07 [error] 761#0: *107 FastCGI sent in stderr: "PHP Fatal error: Call to undefined method OnePica_ImageCdn_Helper_Image::directResize() in /var/www/mydomain.com/public_html/app/design/frontend/default/siteName/
(Ive replaced URL's and Ip's with generics in these logs)
Please help!