When using memcache caching with ad module approved and offline ads are also served. I have put some ads into offline mode but they are still showing up in rotation. When I disable memcache ads are not displayed any more. Putin ad into offline mode gives me this drupal message:
function(ad_cache_memcache_adcacheapi) action(offline)
I have tried running memcache cron and ad cron and offline ad was still showing up.
This is what debug=2 gives me.
ad_dir: '/home/rzlender/redesign/www/sites/all/modules/ad'
debug: '2'
adcache: 'memcache'
nids: ''
tids: '429645'
hostid: ''
url: ''
quantity: '1'
aid: '0'
ad_display: 'javascript'
Attempting to include cache include file '/home/rzlender/redesign/www/sites/all/modules/ad/cache/memcache/ad_cache_memcache.inc'.
Drupal bootstrap '0'.
Override smtp_library: './sites/all/modules/smtp.inc'
Override cache_inc: './sites/all/modules/memcache/memcache.inc'
Override memcache_servers: 'Array'
Override memcache_bins: 'Array'
Override sf_cache_enabled: ''
Root drupal directory detected as '/home/rzlender/redesign/www'./home/rzlender/redesign/www/sites/all/modules/ad/serve.php: // $Id: serve.php,v 1.1.2.2 2007/10/19 02:46:40 jeremy Exp $
/home/rzlender/redesign/www/sites/all/modules/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.79 2008/06/28 00:15:36 jeremy Exp $Memcache: entering ad_cache_memcache().
Memcache: retrieving hook info from cache.
Memcache: selecting from the following ad id(s): 919245, 919246.
Selecting 1 ad(s) from 2 total ad(s).
Randomly selecting ad: 1 of 1.
Invoking adserve hook 'adserve_select' in memcache cache.
Memcache: retrieving hook info from cache.
Memcache: adserve_select: no select function defined
Default ID selection in adserve.inc.
Randomly selected ID: 919246.
Displaying AID: 919246.
Memcache: increment action(view) aid(919246) group(429645) hostid(none).
Memcache: incrementing ad-view-919246-429645-none-2008072108 (7)
Invoking adserve hook 'adserve_init_text' in memcache cache.
Function 'ad_cache_memcache_adserve_init_text' does not exist.
Invoking adserve hook 'adserve_exit_text' in memcache cache.
Function 'ad_cache_memcache_adserve_exit_text' does not exist.
document.write('\x3cdiv class=\"image-advertisement\" id=\"ad-919246\"\x3e\x3ca href=\"http://www.redesign.rz.d2.nowpublic.com/ad/redirect/919246/429645/\" title=\"Crowdpower\" target=\"_self\"\x3e\x3cimg src=\"http://media.le.ae.d2.nowpublic.com/promo_crowdpower1.png\" width=\"300\" height=\"250\" alt=\"Crowdpower\" /\x3e\x3c/a\x3e\x3c/div\x3e');
Comments
Comment #1
jeremy commentedThis is most likely a bug with the "offline" state which I don't currently use myself and thus is largely untested. If you need a temporary workaround, you may want to try disabling ads by putting them into the "expired" state.
Comment #2
Rok Žlender commentedYep that did the trick.
Comment #3
jeremy commentedThanks for the bug report. I'll review whether this is a general bug with the "offline" state, or only an issue with the ad_cache_memcache module.
Comment #4
jeremy commentedI'm unable to duplicate this. Using the ad_cache_memcache module, if I put an advertisement into the offline state it stops displaying. If I put it back online, it starts displaying again.
Due to the debug message you mention, I suspect you're using an older, outdated version of the module. You should not see any debug when putting advertisements offline. Please try the latest version of the module, and re-open this issue if you still have a problem.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #6
bekkah08 commentedHi... I'm also having dramas... It returns a message saying
ad_cache_memcache.module: Unable to syncronize cache: Memcache is not installed, memcache_add_server not found.
ad_cache_memcache.module: Unable to build cache: Memcache is not installed, memcache_add_server not found.
and then hangs the site...
What the?
Comment #7
lmakarovI can confirm that the issue is still there with both memcache and file cache.
Offline ads are still being displayed when server using any cache.
Output for:
http://mysite/sites/all/modules/ad/serve.php?m=jquery&q=1&t=486642&debug=2
Output for:
http://mysite/sites/all/modules/ad/serve.php?m=jquery&q=1&c=memcache&t=4...
I noticed that once ad was cached it will never be dropped from cache thus will be always displayed regardless of the ad status changes.
The only thing that fixes this is obviously restarting memcached...
Comment #8
lmakarovThe issue was with ad-taxonomy-cache-tid memcahed keys - these are NEVER updated.
Here is a patch from me that resolves the issue:
ad_cache_memcache.module
find:
replace with:
Cache only active ads, since what was cache is going to display.
after:
add:
This makes sure ad-taxonomy-cache-tid keys are flushed as well
Comment #9
lmakarovComment #10
xipher84 commentedHi there, I did have this kind of error and I also did php -i | grep memcache and it says memcache is enabled, but my solution that solved the problem was when I edited the php.ini, i simply modified the extension_dir="./" line to the full path of the extensions directory which now looked like this, extension_dir="/usr/local/lib" -- you need to check where the extension directory of the php reside and make sure memcache.so is there..
then i simply restarted httpd and alas the problem is gone.
you can check the detailed steps here:
http://joemarie-aliling.com/223/php-programming/php-memcache-not-found-p...
Comment #11
john franklin commentedClosing out all bugs for 5.x and older versions of Drupal. If this is still an issue, please reopen and update with 6.x details.