Skip to content
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

WARNING [cache] Failed to save key "xxx" #36513

Closed
peter-gribanov opened this issue Apr 21, 2020 · 4 comments
Closed

WARNING [cache] Failed to save key "xxx" #36513

peter-gribanov opened this issue Apr 21, 2020 · 4 comments

Comments

@peter-gribanov
Copy link
Contributor

peter-gribanov commented Apr 21, 2020

Symfony version(s) affected: 3.4.39

Description

There are quite a few warnings when executing console commands.

symfony_error2

12:13:36 WARNING   [cache] Failed to save key "Symfony.Component.Form.Form" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "Symfony.Component.Form.Form","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "IteratorAggregate" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "IteratorAggregate","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "Traversable" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "Traversable","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "Symfony.Component.Form.FormInterface" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "Symfony.Component.Form.FormInterface","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "ArrayAccess" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "ArrayAccess","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "Countable" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "Countable","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "FOS.UserBundle.Model.User" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "FOS.UserBundle.Model.User","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "FOS.UserBundle.Model.UserInterface" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "FOS.UserBundle.Model.UserInterface","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "Symfony.Component.Security.Core.User.AdvancedUserInterface" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "Symfony.Component.Security.Core.User.AdvancedUserInterface","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "Symfony.Component.Security.Core.User.UserInterface" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "Symfony.Component.Security.Core.User.UserInterface","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "Serializable" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "Serializable","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "FOS.UserBundle.Model.GroupableInterface" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "FOS.UserBundle.Model.GroupableInterface","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "FOS.UserBundle.Model.Group" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "FOS.UserBundle.Model.Group","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
12:13:36 WARNING   [cache] Failed to save key "FOS.UserBundle.Model.GroupInterface" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "FOS.UserBundle.Model.GroupInterface","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
10:28:02 WARNING   [cache] Failed to save key "Contest.Vote.Domain.Command.UpdateTotalVotes" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "Contest.Vote.Domain.Command.UpdateTotalVotes","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]
10:28:02 WARNING   [cache] Failed to save key "Core.CQRS.Command.CommandInterface" (Symfony\Component\Validator\Mapping\ClassMetadata) ["key" => "Core.CQRS.Command.CommandInterface","type" => "Symfony\Component\Validator\Mapping\ClassMetadata","exception" => null]

How to reproduce

This problem occurs on the prod server. On the local machine, this problem does not reproduce.

I can't reproduce the error because i do not understand the reason and context of its occurrence.

How is the \Traversable class and Symfony Validator component related and why it should be cached?

@xabbuh
Copy link
Member

xabbuh commented Apr 21, 2020

Related to #34962?

@peter-gribanov
Copy link
Contributor Author

peter-gribanov commented Apr 21, 2020

Maybe. I'm not sure. I do not control caching of \Traversable class and Symfony Validator component.

My cache config:

framework:
    annotations:
        cache: 'app.cache.annotations'
    cache:
        app: 'app.cache.app'
        system: 'app.cache.system'
services:
    app.cache.annotations:
        parent: 'doctrine_cache.abstract.apcu'
        public: false
        calls:
            - [ setNamespace, [ '%app.hash%|%secret%|sac:' ] ]

    app.cache.app:
        parent: 'cache.adapter.apcu'
        arguments: [ '%app.hash%|%secret%|sac:', 0, ~ ]
        public: false

    app.cache.system:
        parent: 'cache.adapter.apcu'
        arguments: [ '%app.hash%|%secret%|ssc:', 0, ~ ]
        public: false

@nicolas-grekas
Copy link
Member

Yes, that's the same as #34962
You redefine the cache.system service, which is used by system caches, among them is the validator cache. Closing as duplicate then, please follow the other issue.

@antoine1003
Copy link

I fixed this by adding apc.enable_cli = 1 in php.ini file 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants