Closed Perni1984 closed 8 years ago
Check your entities for namespace issues, typos... I just had this issue, and I'd typoed a namespace in my use statements. Dec env worked for me as well, but not prod...
Doc:entities:validate might give you a clue as well?
On 1 November 2015 10:46:38 GMT-06:00, Christoph Pernsteiner notifications@github.com wrote:
Just recently my production environment decided to stop working, whereas the dev environment still works fine.
No matter which url I try to open (in this example I try the homepage with english locale -> http://webserver/en) in production, I receive a 503 service unavailable and when I look into prod logs, I see the following messages
''' [2015-11-01 17:40:42] app.DEBUG: Loading translation resources from cache file. [] {"file":"/var/www/html/dom_relaunch/vendor/kunstmaan/bundles-cms/src/Kunstmaan/TranslatorBundle/Service/Translator/ResourceCacher.php","line":41,"class":"Kunstmaan\TranslatorBundle\Service\Translator\ResourceCacher","function":"getCachedResources"} [2015-11-01 17:40:42] app.DEBUG: Router Symfony\Bundle\FrameworkBundle\Routing\Router was not able to match, message "" [] {"file":"/var/www/html/dom_relaunch/vendor/symfony-cmf/routing/ChainRouter.php","line":191,"class":"Symfony\Cmf\Component\Routing\ChainRouter","function":"doMatch"} [2015-11-01 17:40:42] app.DEBUG: Router Kunstmaan\RedirectBundle\Router\RedirectRouter was not able to match, message "No routes found for "/en"." [] {"file":"/var/www/html/dom_relaunch/vendor/symfony-cmf/routing/ChainRouter.php","line":191,"class":"Symfony\Cmf\Component\Routing\ChainRouter","function":"doMatch"} [2015-11-01 17:40:42] php.CRITICAL: Fatal Compile Error: require(): Failed opening required '/var/www/html/dom_relaunch/app/cache/prod/doctrine/orm/Proxies/CGKunstmaanNodeBundleEntityNode.php' (include_path='.:/usr/share/php:/usr/share/pear') {"type":64,"file":"/var/www/html/dom_relaunch/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php","line":209,"level":6143,"stack":[]} {"file":"/var/www/html/dom_relaunch/app/cache/prod/classes.php","line":1984,"class":"Symfony\Component\Debug\ErrorHandler","function":"handleException"} [2015-11-01 17:40:42] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Compile Error: require(): Failed opening required '/var/www/html/dom_relaunch/app/cache/prod/doctrine/orm/Proxies/CGKunstmaanNodeBundleEntityNode.php' (include_path='.:/usr/share/php:/usr/share/pear')" at /var/www/html/dom_relaunch/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php line 209 {"exception":"[object](Symfony\Component\Debug\Exception\FatalErrorException%28code: 0%29: Compile Error: require%28%29: Failed opening required) at /var/www/html/dom_relaunch/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:209)"} {"file":"/var/www/html/dom_relaunch/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php","line":89,"class":"Symf ony\Component\HttpKernel\EventListener\ExceptionListener","function":"logException"} '''
When I open the same url in the dev environment with http://webserver/app_dev.php/en/ the site is shown fine.
I already deleted both production and dev cache directories and also deleted the translation cache -> no effect.
When I copy app/dev/cache/.../CGKunstmaanNodeBundleEntityNode.php to app/prod/cache/.../, it works for some time, but stops working after some time. I guess the production cache gets emptied somehow, anyway I don't think it is a viable solution, I just wanted to know if that would fix the problem.
Does somebody have a clou why Doctrine decided to stop working and not generates this Proxy classes anymore?
Reply to this email directly or view it on GitHub: https://github.com/Kunstmaan/KunstmaanBundlesCMS/issues/796
Sent from my Android device with K-9 Mail. Please excuse my brevity.
hmm... strangely enough the error is gone now, although I am not aware that I changed anything. Will close and reopen the issue if it happens again.
@Perni1984, in production environment, those files won’t be created on demand, you need to warmup cache instead. Maybe you forgot this step?
@mlebkowski: that must have been the issue. I did a brute-foce delete of the prod-cache with rm app/cache/prod/* -R
and did not do any warmup. Thanks for pointing it out. Coming originally from Symfony 1.x I did not know that this was necessary in production.
Just recently my production environment decided to stop working, whereas the dev environment still works fine.
No matter which url I try to open (in this example I try the homepage with english locale -> http://webserver/en) in production, I receive a 503 service unavailable and when I look into prod logs, I see the following messages
When I open the same url in the dev environment with http://webserver/app_dev.php/en/ the site is shown fine.
I already deleted both production and dev cache directories and also deleted the translation cache -> no effect.
When I copy
app/
_dev_/cache/.../__CG__KunstmaanNodeBundleEntityNode.php
toapp/
_prod_/cache/.../
, it works for some time, but stops working after some time. I guess the production cache gets emptied somehow, anyway I don't think it is a viable solution, I just wanted to know if that would fix the problem.Does somebody have a clou why Doctrine decided to stop working and not generates this Proxy classes anymore?