Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #121395
    Harman
    Guest

    Hello Team,
    My name is Harman and I’m Frontend dev of http://www.qualenergia.it.
    The platform is developed on WordPress CMS and the infrastructure is made by Docker Containers for Database, WordPress, Redis and other configs.
    In my debug log I’m seeing this error “[15-Dec-2023 09:30:00 UTC] PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 4161536 bytes) in /var/www/html/wp-content/plugins/w3-total-cache/Cache_Redis.php on line 148”. this error comes in debug log every minute.

    The config of redis container is:
    maxmemory 1024mb
    maxmemory-policy allkeys-lru

    But the debug line is saying 1073,74 mb, I don’t understand which object is trying to allocate inside Redis memory.

    Is there any command to debug redis object that’s trying to allocate inside?

    Let me know ASAP, this is urgent because sometimes the website crash automatically.

    #121402

    Hello Harman,

    Thank you for reaching out and I am happy to help!
    This depends on what is connected with your Redis instance and if the memory allocated is sufficient for the amount of data that needs to be stored. It also depends on which features in the W3 Total Cache you are using with Redis.
    You should try to flush Redis
    To Flush the Redis Cache, either the FLUSHDB or the FLUSHALL commands could be used. FLUSHDB command deletes all the keys of the DBs selected and the FLUSHALL command deletes all the keys of all the existing databases, not just the selected one.

    The syntax for the commands are:

    redis-cli FLUSHDB
    redis-cli -n DB_NUMBER FLUSHDB
    redis-cli -n DB_NUMBER FLUSHDB ASYNC
    redis-cli FLUSHALL
    redis-cli FLUSHALL ASYNC
    For instance, to delete all the keys of a database #4 from the Redis cache, the syntax to be used is:

    $ redis-cli -n 4 FLUSHDB

    Let me know if this helps!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to al’ is closed to new replies.