1

I'm maintaining a pretty big news site, with many nodes and with many users who can create and edit nodes. The site is using the Paragraphs and the Memcache modules.

Editors can rearrange the blocks on the front page, add and edit articles. The problem is that occasionally (and sometimes pretty often) when editors do something on the site, the changes won't be immediately visible; they won't be even visible in the edit form when editors try to edit the node again. It will appear after few edits.

I know the change is effective since the first edit, as a call to dmemcache_object()->flush() makes the changes visible. This makes me think it's a problem with Memcache. However, replacing it with Redis doesn't fix the issue.

Core cache is basically disabled as we are caching everything in the CDN, but editors have direct access to the site, without CDN, and experience this problem there, so it's not CDN related. The following is the cache configuration.

screenshot

I cannot reproduce the problem locally, even if I'm also using Memcache/Redis.
Sometime, when editors create a new node with paragraphs, the node appears "empty." During the edit, there are also no paragraphs. However dmemcache_object()->flush() seems to fix this problem. (I tried it few times.) Adding a call to dmemcache_object()->flush() in a save/update hook implementation doesn't help, though.

What can I do to diagnose and fix this problem? It is particularly hard to approach because it happens only on the production server.

When I use the Redis module and add the following lines to the settings.php file, I get a problem with the path aliases, which aren't shown anymore.

$conf['path_inc'] = 'sites/all/modules/contrib/redis/redis.path.inc';

When that line is removed and the cache is cleared, the path aliases are correctly shown.

Also, the database is located on a different server.

1 Answer 1

0

Try Expire module instead you try to clear cache manually.

This module provides configurable actions upon events that will expire URLs from caches like reverse proxy caches, internal page caches, etc.This module make more sense when Minimum Cache Lifetime setting is set to a value other than none.

There is now integration with the following modules:

Boost - deletes expired pages (files) from the file system.
Varnish - integrates over an administrative socket.
Fastly - Varnish/CDN caching
Purge - expires urls by sending purge requests to Varnish, Squid and Nginx over HTTP.
Acquia Purge - allows Drupal sites hosted on Acquia Cloud to automatically purge pages from their Varnish powered load balancers..
Memcache Storage - allows to delete pages that were cached in a memcached instances.
Akamai - provides an integration with the Akamai Cache Control Utility (CCU) Web Service
Recacher - Page cache warmer.

and Memchache Storage mdoule

Features

This module is an alternative to Memcache API and Integration module focused on different set of features. Available features (D7):

    You can move all cache to the memory.
    You can move users' sessions to the memory.
    You can move lock system to the memory.
    Module can store cached pages for anonymous users as a plain text, so proxy servers (like Nginx with enabled ngx_http_memcached) can get such pages directly from memcached pool and avoid heavy requests to the backend.
    You can clear data from single cache bin, cache cluster or flush all cached data from Drupal UI (screenshot).
    You can find helpful nice debug output (screenshot).
    Integration with Drush
    Integration with Administration menu. Module provides link for flushing memcached data from navigation toolbar.
    Active development and support.
7
  • I'm using Expire module already, sorry if I didn't make this clear. However it doesn't help. I think adding dmemcache_object()->flush(); in multiple places (submit handlers etc) helped things a little bit, but not fixed it. Also I got a feedback that during redis time things got much worse. Redis was using a bigger pool of RAM, so maybe this is related. Hmm. If problem was related to memcache AND redis modules, I doubt that changing a backend once more will help. Could it be broken RAM or something? Jun 30, 2016 at 8:48
  • @ŁukaszZaroda you're welcome,maybe ,this is abroad and maybe there are many reason than cause it. is there any error in log? did you try disable redis temporary?
    – Yuseferi
    Jun 30, 2016 at 9:26
  • Do you know any possible cause of this behavior, that I could check/consider? I couldn't find anything in logs. The problem is that I cannot really disable memcache/redis on production because it would put too much stress on the server, but in desperation I could try this to confirm if would stop happening. Jun 30, 2016 at 9:50
  • Do you got the solution ? I am also facing the same issue
    – Rifas Ali
    Dec 18, 2019 at 5:07
  • @RifasAli who? me or Lukasz? :). So please mention him. he didn't notified
    – Yuseferi
    Dec 18, 2019 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.