[kforge-dev] Weird DB error on session lookup
John Bywater
john.bywater at appropriatesoftware.net
Mon Jan 12 17:15:59 UTC 2009
Rufus Pollock wrote:
>> Sometimes SQLObject can fail to construct a valid SQL query, but I don't see
>> why the find() method would fail in this way when retrieving a Session by
>> key. Especially intermittently.
>>
>
> Yes it is odd and seems specific to accessing the trac part of the site ...
>
That actually sounded like a clue. :-)
(Wondered if Trac and setuptools are interacting to pull in wrong
version of SQLObject. Trac may depend on something that depends on a
broken version of SQLObject. Unlikely but possibly this or something
similar.)
>> Can you find the full SQL query in the log? I suspect it ends with "WHERE",
>> that there isn't any condition, and so it doesn't execute.
>>
>
> I can't find the full SQL query in the log (it was one of the things
> I'd looked for before writing). To get the query in the log do I need
> to set debug level in the kforge log to 'DEBUG'?
>
I doubted it would be in the log, and I doubt changing the DEBUG level
will reveal any more.
(But probably it would be better if this error wasn't handled as a Key
error.)
>> Is it intermittent? Is this happening only following your recent upgrade?
>>
>
> 1. Intermittency: yes and no. It appears to regularly happen on access
> to trac sites but once it has happened once in a given firefox session
> it does not happen again (perhaps cookie is established, or
> credentials are being cached in FF ...). For example if I today visit:
>
> http://project.knowledgeforge.net/domainmodel/trac/ticket/25
>
> No error appears in the log and I'm not prompted for a login in FF
> (I've had closed and reopened FF since yesterday).
>
And when I hit that link I get a pop up despite being logged in....
> 2. Looking back through the logs it appears this sort of error has
> been happening since before the recent upgrade.
>
In basic terms, I would say the situation is that an SQL query isn't
executing properly. Such calls goes through many libraries, so it could
be system configuration, something getting screwed up (Python package
version contention?) when Trac is loaded. But equally, there might be a
method called by the authentication handler in a way which is doomed to
fail.
If the undesirable behaviour can't be reproduced in a development
environment, your application service provision will need to be
reviewed. (I haven't seen this on kforge.appropriatesoftware.net but it
does use an older version.)
I'm sure I could get to the bottom of it soon enough, but unfortunately
I don't really have the resources to address it immediately. But if you
wanted to tip some coins in the magic hat, I might be able to move
things around. ;-)
Best wishes,
John.
> Regards,
>
> Rufus
>
>
>
>
--
John Bywater, Director
http://appropriatesoftware.net
Telephone: 07811 39229
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/kforge-dev/attachments/20090112/4425bc14/attachment-0001.html>
More information about the kforge-dev
mailing list