I have two situations that lead to 500 server errors.

I am using apache + mod_fcgid + WSGIServer from flup.server.fcgi

- Error - sqlalchemy.exceptions.IntegrityError: (IntegrityError)
(1062, "Duplicate entry 'xxx-cache-key-here-xxx' for key 2
")
on a cache call from beaker.ext.database.

I got this during a stress test of the application by loading lots of
pages with an unprimed cache running on one server with filesystem
locks. Shouldn't beaker handle this exception. I don't know exactly
what happenend here, but even if the cachelock had prevented the
situation, it's still possible that two different webservers using the
same dbstore might decide that they have a lock for a non-existing
namespace.

- Error - sqlalchemy.exceptions.InvalidRequestError: Parent instance
<class 'app.models.objects.Widget'> is not bound to a Session, and no
contextual session is
established; lazy load operation of attribute 'widgettype' cannot
proceed

This occasionally happens when a request comes in after a long period
of no activity. I have seen this occur for diffrent sqla-mapped
objects.

Has anyone else seen this?

I will upgrade to the 1.0 version of flup and moved the
dbsession.remove call to the beginning of a request instead of at the
end in a try finally block as described in the sqla04-in-a-hurry
document.

I am guessing here so if anyone has an insight that can explain or
solve this scary (shared-something) stuff I'd be glad to hear it.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to