[support] Problem with Drupals built in cache

Jamie Holly hovercrafter at earthlink.net
Thu Jan 20 12:45:22 UTC 2011


Drupal is still going to check the access table to see if you have any 
blocks in there for the current user, even if the table is empty.

The semaphore you are seeing is to prevent a cache stampede. You said 
that once you disabled memcache, everything worked fine. It looks like 
you have a problem with either your memcache server, the PHP memcache 
extension or your settings in Drupal for memcache. I would check the 
server first, since that's the easier. You can just do a telnet to check 
that out. From shell:

telnet (server address) (server port)

See if it connects OK.

As far as Pressflow+Memcache, yeah they work great together. I run that 
combination for a couple of clients, including one that has seen over 
150,000 page an hour, and never had a problem.

Jamie Holly
http://www.intoxination.net
http://www.hollyit.net


On 1/20/2011 4:12 AM, Margusja wrote:
> If I disable memcache support in PHP then in the problematic server I
> see that there no problem anymore. So can memcache and pressflow cache
> work parallel ?
>
> Tervitades, Margus (Margusja) Roo
> +372 51 48 780
> http://margus.roo.ee
> msn: margusja at kodila.ee
> skype: margusja
>
>
> On 1/20/11 10:09 AM, Margusja wrote:
> >  Hi
> >
> >  I have two separate Drupal instances (Pressflow 6.19) In first one the
> >  local cache works fine. Sql log:
> >              326 Query       SET NAMES "utf8"
> >              326 Query       SELECT 1 FROM access WHERE type = 'host' AND
> >  '195.50.208.170' LIKE mask AND status = 0 LIMIT 0, 1
> >              326 Query       SELECT data, created, headers, expire,
> >  serialized FROM cache WHERE cid = 'variables'
> >              326 Query       SELECT data, created, headers, expire,
> >  serialized FROM cache_page WHERE cid = 'http://IP/path/to/node'
> >              326 Query       SELECT name, filename, throttle FROM system
> >  WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight
> >  ASC, filename ASC
> >              326 Query       SELECT name, filename, throttle FROM system
> >  WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight
> >  ASC, filename ASC
> >              326 Quit
> >
> >  But If I request the same node in the second machine. The code is same,
> >  then the Sql log is:
> >                122 Quit
> >                123 Query       SET NAMES "utf8"
> >                123 Query       SELECT 1 FROM access WHERE type = 'host'
> >  AND 'IP' LIKE mask AND status = 0 LIMIT 0, 1
> >                123 Query       INSERT INTO semaphore (name, value, expire)
> >  VALUES ('variable_cache_regenerate',
> >  '17865562914d37e5d81acd80.47344784', 1295508982.1098)
> >                123 Query       SELECT * FROM variable
> >                123 Query       DELETE FROM semaphore WHERE name =
> >  'variable_cache_regenerate' AND value = '17865562914d37e5d81acd80.47344784'
> >                123 Query       SELECT name, filename, throttle FROM system
> >  WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight
> >  ASC, filename ASC
> >                123 Query       SELECT * FROM languages ORDER BY weight
> >  ASC, name ASC
> >                123 Query       SELECT dst FROM url_alias LIMIT 0, 1
> >                123 Query       SELECT src FROM url_alias WHERE dst =
> >  'hoiused-ja-investeerimine' AND language IN('et', '') ORDER BY language
> >  DESC, pid DESC
> >                123 Query       SELECT name, filename, throttle FROM system
> >  WHERE type = 'module' AND status = 1 ORDER BY weight ASC, filename ASC
> >                123 Query       INSERT INTO semaphore (name, value, expire)
> >  VALUES ('locale_cache_et', '17865562914d37e5d81acd80.47344784',
> >  1295508982.4035)
> >                123 Query       SELECT s.source, t.translation, t.language
> >  FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND
> >  t.language = 'et' WHERE s.textgroup = 'default' AND s.version = '6.19'
> >  AND LENGTH(s.source)<   75
> >                123 Query       DELETE FROM semaphore WHERE name =
> >  'locale_cache_et' AND value = '17865562914d37e5d81acd80.47344784'
> >                123 Query       SELECT s.lid, t.translation, s.version FROM
> >  locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND
> >  t.language = 'et' WHERE s.source = 'Stores details about batches
> >  (processes that run in multiple HTTP requests).' AND s.textgroup =
> >  'default'
> >  ....
> >  ....
> >  loads of SQLs
> >
> >  The main question why does the last one ask something from semaphore? In
> >  both servers access table is empty. At first I thought the condition
> >  came from that SQL: SELECT 1 FROM access WHERE type = 'host' AND 'IP'
> >  LIKE mask AND status = 0 LIMIT 0, 1 but as I said in both servers access
> >  table is empty.
> >
> >  In both solutions caches are enabled.
> >
> >  Any hints?
> >


More information about the support mailing list