HTTP 503 with Apache/mod_wsgi

9 views
Skip to first unread message

Thierry Florac

unread,
Oct 18, 2023, 2:44:59 AM10/18/23
to pylons-...@googlegroups.com
Hi!
I have a problem with a Pyramid application which is deployed in production with Apache 2.4 and mod_wsgi behind an HAProxy cluster.
On a "regular basis" and after some time of correct behaviour, I start to receive HTTP 503 errors (service unavailable), but without any clear error message.

The application is using a ZODB and when looking at the logs, the only error I can find (but I'm not sure if it is really related) is a ConnectionStateError:

  ZODB.POSException.ConnectionStateError: Shouldn't load state for pyams_security.utility.SecurityManager 0x18 when the connection is closed

I'm using a custom security policy which relies on specific plug-ins; is there a rule which may prevent accessing the ZODB from the security policy?

Moreover:
- I never receive these errors when I'm in development mode, but only in production with Apache and mod_wsgi;
- it *seems* that this error occurs more frequently when requests are done by robots and web crawlers!
What could be the origin of the problem?

Any advice would be greatly appreciated...

Best regards,
Thierry

Thierry Florac

unread,
Oct 18, 2023, 2:47:19 AM10/18/23
to pylons-...@googlegroups.com
I forgot to mention that I'm still using Pyramid 1.10.8, with various Python versions from 3.5 to 3.11...

Best regards,
Thierry

Reply all
Reply to author
Forward
0 new messages