I'm trying to deploy boost module on a high available environment.
Here is some back ground on our environment. We are on Solaris, two web servers on apache2 with NFS share and two multimaster replicated mysql databases. Also we are load balancing the two web servers via F5.
Here is the problem I'm able to install and run boost module without any problem on a single machine installation. But when i install the boost module on the multiple web server setup. Boost module will not create any pages.
I see the norm,perm and www.domain.com directories getting created under cache but no cache files are getting created. I tired different options like shutting down one machine working with one web server. None of the trick worked. Did any of you run into any such problem with the boost module. What could be the usual suspect if the cache files are not created under cache dir.
Also www.domain.com is a load balanced host name for our drupal deployment. When we disable the static page cache under boost setting we are able to access our site home page through our load balanced hostname(www.domain.com). If we enable the static page cache then try access the www.domain.com it looks like the site is getting loaded for a second then it gives the connections reset error message.
Any advise will be much appreciated. Thanks
Here the .htaccess file,
### BOOST START ###
AddDefaultCharset utf-8
Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
AddCharset utf-8 .html
AddCharset utf-8 .css
AddCharset utf-8 .js
ForceType text/html
ForceType text/javascript
ForceType text/css
# NORMAL - Cached css & js files
RewriteCond /shared/drupal/cache/perm/www.domain.com%{REQUEST_URI}_\.css -s
RewriteRule .* cache/perm/www.domain.com%{REQUEST_URI}_\.css [L,QSA,T=text/css]
RewriteCond /shared/drupal/cache/perm/www.domain.com%{REQUEST_URI}_\.js -s
RewriteRule .* cache/perm/www.domain.com%{REQUEST_URI}_\.js [L,QSA,T=text/javascript]
# Caching for anonymous users
# Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request
RewriteCond %{REQUEST_METHOD} !^GET$ [OR]
RewriteCond %{REQUEST_URI} (^(admin|cache|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]
RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
RewriteCond %{HTTPS} on
RewriteRule .* - [S=1]
# NORMAL
RewriteCond /shared/drupal/cache/normal/www.domain.com%{REQUEST_URI}_%{QUERY_STRING}\.html -s
RewriteRule .* cache/normal/www.domain.com%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]
### BOOST END ###
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedno files are being created, correct? On the boost settings page set the verbose level to 9; it should tell you in the watchdog why it can't cache the page.
Comment #2
AlexisWilke CreditAttribution: AlexisWilke commentedI ran in that problem for a little while (actually NONE of my pages would be saved in a sub-folder, only those in the top folder.) With the "latest" 1.x-dev it now works (i.e. Oct 18, 2010 version.)
One of the errors I can see is an implode():
Type php
Date Wednesday, October 20, 2010 - 18:45
User Anonymous
Location http://snapwebsites.info/journal
Referrer
Message implode() [function.implode]: Invalid arguments passed in /usr/clients/www_html/new.m2osw.com/public_html/sites/all/modules/boost/boost.module on line 2140.
Severity error
Hostname 123.123.123.123
Operations
The code I had on line 2140 did not correspond to an implode()... so I'm not too sure what the errors was about.
Thank you.
Alexis
Comment #3
vangorra CreditAttribution: vangorra commentedStill happening for me. Any ideas?
Comment #4
h3rj4n CreditAttribution: h3rj4n commentedWould be nice if the boost module checks if the dir exists and if it can be writen by the module / drupal.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentederm, on 7.x-1 it already does, in status report you get this message if the directory is not writeable
Boost Can not write to file-system
Directory /var/www/html/drupal/cache/normal credentials - Permissions: 0555. Owner 48. Group 48.
Your credentials - Group ID: 48. User ID: 48. Current script owner: apache.
(except it's in red).
Comment #6
abhitesh.das CreditAttribution: abhitesh.das commentedI ran into the same issue.
Boost doesn't creates the cache files, the only file I could find in the cache/normal/example.com is .htaccess
Things we tried to resolve this:
But, unfortunately, none of the above worked.
However, when I installed it on the other server a few weeks ago, it worked perfectly fine. This time its not creating cache files. We have ensured the process followed for both the installation is same.
Any help/guidance is highly appreciated.
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedSo you did not create this file or folder structure ? which would suggest that boost can write to the file system.
With non-creation of files normally it's because a module (other than boost) is setting DRUPAL_UID which you can check for in developer tools in chrome or firebug in firefox.
Comment #8
abhitesh.das CreditAttribution: abhitesh.das commented@Philip :
Thanks for your response.. :)
You are right, I can see the DRUPAL_UID is set to '-1' even for the anonymous user.
I have checked the complete code base and couldn't find DRUPAL_UID being used in any module except Boost.
However, I am facing a strange issue. When I visit the home page, it creates the cache file, but for rest it doesnt creates the cache file.
Though I am not sure if this has got something to do with .htaccess, below is the htaccess code generated by Boost module.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedOk, DRUPAL_UID is a flag cookie set that states "this user is not anonymous" so what you need to do is find out which module is create a drupal session (which may be faked)so you need to find out what is setting a cookie like
SESS01653194f68663b9145245dbd3a618ec=mwlDhNm12kBwfDowiRtzArB9_6XqjdtrwiFgTmyNrRg; expires=Wed, 10 Jul 2013 19:50:22 GMT; path=/; domain=.howtogetdivorced.com; HttpOnly
It may be your theme if it is responsive, or it may be some module that is moving towards drupal "contextual" features which are supposed to deliver stylesheets based on device and screen size.
In "standard" drupal then the session is only established once the user is logged in and then the boost flag cookie is set, but some modules do not obey this and instead of using their own cookie system (which would be module best practice) they use a drupal session. I'd search for
or more likely
in your modules folder using a text editor with a global search function.
Hope this helps.
Comment #10
berliner CreditAttribution: berliner commentedAlso drupal_session_initialize() in includes/session.inc will prevent caching when $_SESSION is not empty:
Comment #11
Makdomen CreditAttribution: Makdomen commentedI have just uninstall removes all data related to a module and that instal the module and works OK
Comment #12
ivanzhu CreditAttribution: ivanzhu commentedThere is another reason could incur this error: No disk space any more on your server....
Comment #13
wafer CreditAttribution: wafer commentedI am newbie as a Drupaler,I have recently installed boost for my project, surprisingly it won't generate cache files under my project directory which is under my [project-folder]/cache/normal/[project-name]/
The directory automatically creates while i have installed boost,but it doesn't save the purpose,how could i resolve the issue?I have also put the .htaccess data to my project's .htaccess file..
Thanks,Your solicit help appreciated.
Comment #14
Anonymous (not verified) CreditAttribution: Anonymous commentedThere are a number of possible answers.
Comment #15
wafer CreditAttribution: wafer commentedActually permission was not the rival, i have already added in group(chgrp),the problem that i was facing is persisted when i have set logging and errors notification setting in config to none. Could you tell me why it was happening while it's not documented anywhere for fixing this issue.
Actually i was just finding around,luckily found myself,but it should have some reason..
If you found please share it.
Comment #16
Anonymous (not verified) CreditAttribution: Anonymous commentedI do not quite understand your english (sorry).
Are you saying that on your boost installation when you turn on logging that no cache file are created ?
Comment #17
wafer CreditAttribution: wafer as a volunteer commentedOn the admin page admin/config/development/logging, under the section "Error messages to display", when "All messages" is set, boost doesn't work i.e. the cache files are not generated at all. However if the setting is changed to "None", the cache files starts getting generated.
Please advise if this is the expected behaviour.
Comment #18
smitty CreditAttribution: smitty commentedUnbelievable but true: I also have got two test installations where - out of a sudden - the creation of cache-files stopped. As soon as I changed on admin/config/development/logging "Error messages to display" to another value than "All messages" the cade-files are generated again.
That's strange, isn't it?
Comment #19
Makdomen CreditAttribution: Makdomen commentedHi,
When you clear the cache or install the boost module, clear the browser's history.
The browser's do not allow to create a new cache in the database, because they already have create cache files in the history.