My client site has a problem when cache is enabled. Blank pages are returned. I've documented what I've done already at http://drupal.org/node/116750. Site is 4.7.x
Almost assuredly the problem is in one of the modules developed in-house.
If you know the answer, or have experience with this sort of error please contact me using my contact form. I am open to an hourly rate with estimate of the number of hours it might take, or a fixed price payable on problem solved.
If needed I'll supply you with a test site for your analysis and testing, if you can convince me that you have the experience to tackle and solve this in a reasonable period of time.
Preferably I'd like the solution documented and posted at drupal.org for the benefit of the community.
John
Comments
Suggestions
I have read your previous post.
I try to help you.
Perhaps you have already investigated, could be a problem of memory_limit in php.ini ?
What value do you have there ?
Webserver logs say something ?
And if you comment the cache_set instructions of these custom modules, and leave
the cache mechanism activated, what happens ?
--
http://www.speedtech.it
In my experience the usual
In my experience the usual cause of this type of problem is that some module is trying to call a function that isn't defined, because drupal doesn't do a full bootstrap when serving cached pages. It might be worth checking to see if any of your in-house modules is doing this.
A good place to look for clues is (as Roberto suggests) your server's error logs. Keep an eye out especially for anything mentioning "php fatal error" or "call to undefined function".
Misconfigured Apache or PHP?
I assume that you checked the web server's error log and confirmed that there are no segfaults from PHP (due to an op code cache or something else). Rule this one out first.
As for your description, I have seen this some time ago, and it was when a client moved from one dedicated server to another. On the old server (Debian) the page cache worked well. On the new machine (Fedora and pesky Plesk), blank pages were returned.
What we found is that the cached page was stored compressed and somehow it was not sent correctly to the browser, and the browser displayed a blank page.
To see if this is your problem, look in the cache table and see if the data is compressed. Clear the cache, then do a "SELECT cid FROM cache" and find your page, then check the data column to see how it looks.
We turned the page cache off anyway, since it is a bottleneck on a high traffic site. Yes, you read that right: the cache can slow a busy site, as counter intuitive as it sounds. We are also moving the site to another machine, so decided not to pursue this until/if it happens on the new machine.
--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com
--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba
Solved (?)
The offer for a paid gig solving this problem has closed.
Thanks heaps to you three guys (and others) who offered suggestions. Your suggestions stimulated me to put in another long session of rigorous testing, and I seem to have found the error.
First though for sure I took into account all the suggestions here, including disabling all references to the cache in the in-house modules, checking and re-checking the apache logs and the memory settings, checking for undefined function calls, and checking the cache table.
In the end I determined that the problem is solved when I remove calls to drupal_add_js in the in-house modules.
I still need to do some final testing, on the live site, and if that confirms my belief that the problem lies in drupal_add_js I will document it at http://drupal.org/node/116750.
Thanks again for the help. I am not sure if anybody could have solved it for me in a 'reasonable time', as it took me quite some hours even with advance knowledge of the site structure.
John
Is the call to drupal_add_js
Is the call to drupal_add_js in a hook_init implementation? If so you should move it to hook_menu(!$may_cache) instead. See http://api.drupal.org/api/4.7/function/hook_init :