1

This is a problem I'm struggling with for a few months already. I'm maintaining a pretty big news website, with a lot of content and multiple editors. The website is using paragraphs (which I don't think is relevant to the core of the problem, but is relevant for the description of it) and Memcache modules. Editors can rearrange the blocks on the front page, add/edit articles etc. The problem is that occasionally (and sometimes pretty often) when editors will do something on the website (edit article, rearrange blocks), change won't be visible on the website. It won't be even visible in the edit form of the just edited node when they will try to edit it again. It will appear after few approaches.

I know that in fact the change is being made after the first time, because I can reappear it with the dmemcache_object()->flush();, which made me think that it is a problem with Memcache. However, I replaced it with Redis and there is no improvement.

Some more information about the problem:

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

enter image description here

  1. I cannot reproduce the problem locally, even if I'm also using Memcache/Redis.
  2. Sometimes when they are creating a new node with paragraphs, it appears "empty". During the edit, there are also no paragraphs. However dmemcache_object()->flush(); seems to fix this problem and makes everything appear (I tried it few times).
  3. I tried even to add dmemcache_object()->flush(); to the save/update hooks, but it didn't help.

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

Added #1: When using redis module, and adding to settings.php:

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

Problem expanded on paths. Some nodes had paths in the form of node/[node_id], but after removing this line, and clearing cache - proper, aliased paths has been restored.

Note: database is located on the different server.

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.
| improve this answer | |
  • 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? – Łukasz Zaroda Jun 30 '16 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 '16 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. – Łukasz Zaroda Jun 30 '16 at 9:50
  • Do you got the solution ? I am also facing the same issue – Rifas Ali Dec 18 '19 at 5:07
  • @RifasAli who? me or Lukasz? :). So please mention him. he didn't notified – Yuseferi Dec 18 '19 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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