[Zope] ZSQLMethod - Cache KeyError

Tino Wildenhain tino@wildenhain.de
Thu, 20 Apr 2000 10:54:56 +0200


Mee to![tm]
Add me![tm]
AOL![tm]
You have new mail![tm]
;-))

Hi Tony

I also got this error and was wondering about it.
Since I have automatic mail on errors running and saw
too many requests with exactly this problem.
The only way I see to fix this at the moment, I can 
only disable the caching. 
I did not dig into the code but wI was also assuming it has
something to do with the way the caching is handled.

Regards
Tino Wildenhain


Tony Rossignol wrote:
> 
> 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.
> -------------------------------
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )