We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15083
    • 697 Posts
    Hi guys,

    Still "battling" with my servers to get memcached working correctly.
    I'm seeing this error when i load a page on my site in the error log just once:

    Memcached::get(): could not uncompress value.

    Pages appear to work fine, just wondering if this is anything I should be concerned about!?

    Thanks

    J
      • 22303 MODX Staff
      • 10,725 Posts
      Do you have the source code of the xPDOCache implementation for the memcached extension you are working with available? There is an option in the memcache extension to indicate the compression to use for entries. Have you set this appropriately for the memcached extension?
        • 15083
        • 697 Posts
        Attached smiley
        You will see its just your xpdomemcache class with a few very small changes.
        I commented out those lines, as memcached get/set only seems to take 3 parameters.
        "Seemed" to be working fine!
          • 15083
          • 697 Posts
          I commented out the line as there does not seem to be a setCompressionThreshold in memcached, so I have no idea why compression errors are getting thrown.
            • 15083
            • 697 Posts
            http://php.net/manual/en/memcached.constants.php
            I do see OPT_COMPRESSION, which is a flag to turn on/off compression.

            I'll try turn it off to see if the error goes away, but would imagine there will be a performance hit?
              • 22303 MODX Staff
              • 10,725 Posts
              First, we should create an official xPDOMemCached class to support this specific extension and help avoid confusion for others.

              Let me know if you come up with a way to set the OPT_COMPRESSION properly in the class.
                • 15083
                • 697 Posts
                It makes sense I guess, memcache is being depreciated as far as I am aware.
                I added the following line to turn it off, solved my problem:

                $this->memcache->setOption(Memcached::OPT_COMPRESSION, false);