Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. LAMP
  3. redis (on lamp) is stuck due to high memory usage

redis (on lamp) is stuck due to high memory usage

Scheduled Pinned Locked Moved Solved LAMP
redislampmemory
4 Posts 2 Posters 1.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      M Offline
      msbt
      App Dev
      wrote on last edited by
      #1

      I was migrating magento to a lamp app including redis as page cache. Everything worked fine for a few hours, but at some point I'm getting this message via email

      37daff30974b5378e8463859563b0028e07babc9ecda9b5663f38d1ab888baef  exited unexpectedly using too much memory!
      ...
      
      {"status":"oom","id":"37daff30974b5378e8463859563b0028e07babc9ecda9b5663f38d1ab888baef","from":"cloudron/redis:1.0.0","Type":"container","Action":"oom","Actor":{"ID":"37daff30974b5378e8463859563b0028e07babc9ecda9b5663f38d1ab888baef","Attributes":{"image":"cloudron/redis:1.0.0","location":"magentoshop.tld","name":"redis-b9e519bd-f638-4ba9-8334-1ab2c569b31a"}},"scope":"local","time":1531611212,"timeNano":1531611212713282300}
      
      -------------------------------------
      

      Usually a flushdb did the trick to get it working again, but right now I can't even send commands via cli, it's showing

      (error) LOADING Redis is loading the dataset in memory

      even if I only try to ping (or flushing) it. /usr/bin/redis-server is running wild on CPU, how can I stop it from loading and clear that db - and more importantly, how can I limit the memory on redis so it won't crash every few hours? I would be thankful for a quick reply, since I've already shut down the former machine and due to the missing cache, the magento shop is terribly slow.

      Best regards

      1 Reply Last reply
      0
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #2

        The redis addon container is running on limited memory. Out of the box this is 150mb.
        You may want to try temporarily increase that with:

        docker update <container id> --memory 512m --memory-swap 1g
        

        Maybe the 150m is just too low for it to work well, given the magento load and thus it is busy doing garbage collection.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          msbt
          App Dev
          wrote on last edited by
          #3

          I've given the server more memory and after some time it eventually was able to clear out the db. I've also disabled redis for the time being and will try to play around with the allocated memory of your suggestion, thanks for that.

          Does this setting affect the maxmemory setting of redis? Some people suggest 1GB, others 2GB+ for several 1000 items in the db (current shop has 6000+), that wouldn't be a problem I reckon? I'll try some numbers next week and keep this thread updated if you like.

          1 Reply Last reply
          0
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #4

            Would be great if you could update this thread with your findings. Also please note that the memory settings for the addons are currently not preserved across app restores or even server reboots. We are working on this fix and you can see the status of it at https://git.cloudron.io/cloudron/box/issues/566

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search