[Zope] ZSQLMethod - Cache KeyError
Tony Rossignol
tonyr@ep.newtimes.com
Mon, 17 Apr 2000 10:45:53 -0700
When using ZSQLMethods we are seeing on occation a KeyError w/ the key
value of a SQL statement. I assume this is related to ZSQLMethod
caching, but don't know if it's a bug or simple something we've done
wrong.
We have a few SQL queries that potentially get hit repeatedly, so I've
put a 300 second (5 minute) cache on them in the ZSQLMethod advanced
options tab. This has had the desired effect of speeding up page
serving when the page is accessed rapidly in succession. However we are
now getting these KeyErrors once in a while.
I'm wondering if the ZSQLMethod may have been expired out of cache, but
somehow left behind some reference to it; or if it might just be a pure
timing issue. The page is requested at the precise moment the cache
cleaner is doing it's thing (not likely I'm guessing).
Has anyone else seen this type of error:
Error type: KeyError
Error value: ("SELECT DISTINCT...
Any ideas where to look for a fix to this, turning off cache for
ZSQLMethod is only a quick fix not a solution for us. Perfomance would
be too adversly effected by eliminating SQL caching from all our
queries.
--Thanks.
--
-------------------------------
tonyr@ep.newtimes.com
Director of Web Technology
New Times, Inc.
-------------------------------