-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in Symfony2's production environment (only) caused with version >= 1.4.0 #32
Comments
Are you sure that you have not received a fatal PHP error before which was just not appearing in the Symfony logs? |
@gnutix maybe you have an old 1.3 cache which would break when reading with 1.4 ? As the cache contains serialized objects, it could be possible |
@schmittjoh I don't think there was a PHP error, as it worked fine in Symfony's dev environment (app_dev.php). I'll try to change app.php to add the debug flag. |
Which cache implementation are you using? |
Probably the default one. Here's the bundle configuration:
|
Can you gist the contents of the cache files? |
I'll try to do that tonight, kind of busy at work right now. |
I am also being bitten by this since upgrading to 1.4. I am also running a symfony2 app. Where should I be looking for the cache files? |
If you have not changed it |
Hi @schmittjoh. I've finally found some time to take a deeper look into this issue. Seems like a filesystem rights one, for what I can tell. Here's the gist you've asked for: https://gist.github.com/gnutix/0ec997f80daa974af414 First, I started with 1.3.0, cleared the cache in prod, loaded my page in SF2 prod env, working fine (didn't thought to check the filesystem rights at this time, sorry). Then, I updated to 1.4.1, cleared the cache in prod, loaded my page in SF2 prod env, and found the "buggy" result (see gist) with the So I checked the filesystem rights for the cache file and here it was :
And the file rights have been changed to |
@gnutix Yeah this seems to be the problem for me too. Good work. |
So, this is a permission issue on your machine if I understand correctly? On Wed, Sep 11, 2013 at 3:22 AM, Tom Corrigan [email protected]:
|
@schmittjoh Yup, seems like it. |
This is not actually a machine specific error. The changes made in this commit result in the file being created with very restrictive permissions This caught me out because I schedule some symfony commands with cron. These are executed by a different user that is unable to read the file. Hence the exception is thrown. I will work on a PR to fix this, it should simply be a matter of |
Nice catch! Indeed once in production I had issues again, and your change fix it. @schmittjoh Could you please merge his commit and tag a new release asap ? Thanks. |
After an upgrade from 1.3.0 to 1.4.0 (or 1.4.1, tried both), the exception added in this commit f68e2a8 is thrown whenever I access one of the pages of my website (but not all of them). It happens only with app.php (not app_dev.php / app_test.php).
Here's the stacktrace :
[2013-09-03 14:59:50] request.CRITICAL: Uncaught PHP Exception LogicException: "The cache must return instances of ClassMetadata, but got false." at /var/www/xxx/vendor/jms/metadata/src/Metadata/MetadataFactory.php line 81 {"exception":"[object] (LogicException: The cache must return instances of ClassMetadata, but got false. at /var/www/xxx/vendor/jms/metadata/src/Metadata/MetadataFactory.php:81)"} []
I've reverted the library to 1.3.0 temporarily, but would very much like to see this resolved. Thanks for your help.
The text was updated successfully, but these errors were encountered: