Posted by mark_anthony on March 16, 2014 at 5:16pm
Hello fellow TC Drupalers,
Does anyone have a good scheme to auto clear the cache of a site on a regular basis?
I started using the Domain access module on a site, and though it worked fine on my local, up live it keeps losing the domain info:
Notice: Undefined index: machine_name in domain_tokens() (line 87 of /var/www/mysite/public/sites/all/modules/domain/domain.tokens.inc).
I have tried a patch I found for Domain access, no luck.
The only thing so far that fixes it is to clear the cache manually. So.... back to my question.
Thanks,
Mark
Comments
Drupal maintains the age of
Drupal maintains the age of the cache itself based on cron runs, and manually clearing the cache on a regular basis will undermine what it's already doing automatically – probably giving you an extremely slow website. I suspect that clearing the cache merely addresses the symptom and not the problem itself.
Here's a checklist that may help us figure it out:
Could you also post a link to the issue you found? That could help us debug too.
--
David Needham
Team Lead of Training at Datadog
About the cache that is what
About the cache that is what I thought that it clears itself. I lowered the cache setting to 3 hours through the Domain Batch settings page, so far (about 24 hrs) the error has not repeated.
Are you running the most recent version of D7? -Yes
Has core been hacked? )-unknown, how does one check but I think unlikely
Are you running the most recent version of domain access? Token module? Other modules? -all up to date
Have you tried the latest development release of domain access? (This is especially important before applying the patch, as patches are commonly built against dev). Domain access 7.x-3.11
Are there any other errors?
Here is where I found the patch:
https://drupal.org/node/1932706
Just saw this one (which seems related but I see no impact to displayed content):
Warning: require_once(/var/www/thefutureinreading/public/sites/all/modules/domain_views/includes/domain_views_handler_filter_domain_access_current_all.inc): failed to open stream: No such file or directory in _registry_check_code() (line 3139 of /var/www/thefutureinreading/public/includes/bootstrap.inc).
What version of PHP are you
What version of PHP are you running locally? What about on the server?
--
David Needham
Team Lead of Training at Datadog
PHP version info plus more
Server:
PHP 5.3.28 (more information) OK
PHP extensions Enabled OK
PHP memory limit 256M
Database system MySQL, MariaDB, or equivalent OK
Database system version 5.6.13
Local:
PHP 5.3.26 (more information) OK
PHP DOM extension Enabled OK
PHP extensions Enabled OK
PHP memory limit 128M
Database system MySQL, MariaDB, or equivalent OK
Database system version 5.1.55-log
PHP DOM extension Enabled OK
So one thing that stands out:
PHP DOM extension Enabled OK
Is on in local, but not in server, hmmm....
Sorry I can't be more help
Hmmm, I'm not sure what that is. Nothing obvious seems out of place.
It's good that you posted on the issue itself. I'd bet that will be the most likely place to find a solution.
--
David Needham
Team Lead of Training at Datadog
Maybe fixed it
Well thanks anyway.
I think I fixed my issue. It seems that a Branding template I had modified to pull in an image did not have a correct path, or the path was causing the template to fail intermittently. Then a whole cascade of template fails would happen (even though the site would still render correctly!) and the domain access would bomb out.
I changed it so the image had a complete path instead of relative and I have not had a problem for at least a week.
Thanks for following up with
Thanks for following up with your solution, it's an interesting case.
Dan Moriarty
www.electriccitizen.com