2

I have been observing difficulties with updating custom magento modules, theme updates, etc which seems related to caching beyond magento caches.

For example when there is a modification version 1 of a particular module, after uploading version 2 files, say I ran magento cli commands for following.

  1. setup:upgrade
  2. di:compile
  3. cache:clean
  4. cache:flush
  5. Deploy static content

Apart from that I remove inner contents of folder generated, pub/static, var/view_preprocessed folder.

Having all above done (so output should be from version 2), still version ones contents are shown, even when related files are either changed or even removed. Version 2 contents appear automatically after many hours, which seems cleaned 'some how' once a day automatically.

With above , what I practice is naming each version of modules differently, remove previous version with old name, and install new version with new name.

For example, if previous version of module was Vendor_Module1, I disable Vender_Module1 with forced removal of static content, then install next version as a fresh installation with name Vendor_Module2. It works but in fact more time consuming. Also have following issues with my approach.

Say there was an error with Vendor_Module1 (I completely removed it) and installed the fixed version as Vendor_Module2. Having all above steps followed, even when files of Vendor_Module2 not exist, old errors re-appears in most cases. It need to disable non-existing module with static content removal to avoid seeing last old error after a module upgrade with above mentioned approach. This re-appearence of errors related to removed old versions stops after several hours as said above.

Apart from cache clean/flush commands, cleaning of cache through backend is also not helpful on above issue.

Varnish cache is enabled.

Have any of you gone through similar issues and/or if you have any suggestions to overcome these, your feedback is highly appreciated.

Thanks and Best Regards

Indunil

2
  • Did you find a solution? tnks, Marco
    – Marco
    Nov 30, 2023 at 7:08
  • Not yet apart from rebooting server. One recently told me restarting php-fpm might help. Couldnt really try that yet Dec 8, 2023 at 2:57

2 Answers 2

3

I see that this post is a little old, I'm sorry that nobody has found an answer for it. I have the same issue with the same setup. This is a very good explanation of the problem. My problem also bled into my custom theme updates. I think it has something to do with the way bitnami has the cache set up. After poking around and finding out what caching programs are running I can add these 2 commands to the list of things that don't work:

Clear Memcached:

nc localhost 11211
:flush_all
:ctrl+Z

and Restarting Varnish

sudo /opt/bitnami/ctlscript.sh restart varnish

The only thing that seems to work for me is rebooting the aws server entirely.

1
  • Thank you very much for your update. Definitely this issue needs more attention. Jan 27, 2023 at 17:20
0

Adding my finding as an answer here, so it would helpful for others facing same issue.

The issue seems sorted when php-fpm is restarted in addition to magento cli commands following code changes. It worked for me without the need of rebooting server.

sudo /opt/bitnami/ctlscript.sh restart php-fpm

Your Answer

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

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