[wp-hackers] Forum: High query count

David Chait davebytes at comcast.net
Tue Jan 24 15:02:15 GMT 2006


Okay, just trying to be clear since there's no Codex info on this. Correct 
me if I'm wrong on anything below.

So the quick-fix is:

  define('DISABLE_CACHE', true);

The longer term solution is either an upgrade to newer WP (2.01 release, or 
sounds like latest head has it?), which will better detect and disable 
things (BTW, Ryan, would be nice if the dashboard had in red letters "Your 
hosting setup doesn't support caching to disk!" -- no joke, if there is a 
hosting 'config' that is really bad for WP, we should make the user 
aware...), or to get the host to fix things or move to another provider or 
???   I presume there is NOT any sort of tweak in htaccess or other 
user-accesible file that'll help this?

-d

| > Perhaps Ryan can comment on what an improperly configured server with
| > safe mode on will do... querying normal WP options like home and
| > siteurl that should exist is strange behavior and may be what was
| > fixed by this:
| > http://trac.wordpress.org/changeset/3436
|
| A broken safe_mode will do it.  is_writable() returns true, indicating
| that we can cache to the disk.  However, when it's time to actually put
| a file in the cache dirs, we fail due to safe_mode and return false when
| trying to retrieve from the cache.  We then query the DB and try to set
| the cache, which fails due to safe_mode.  This happens every time we try
| to read from the cache and results in lots of queries.
|
| So, those affected by this should DISABLE_CACHE.
|
| Ryan



More information about the wp-hackers mailing list