Re: [pylons-discuss] determinate if app object is the server or created from a console script

2023-10-18 Thread Arndt Droullier
Actually I had a similar problem some time ago and used a workaround since. I looked at the pyramid code and I don't think there is a way to handle this without setting up multiple configurations or startup scripts. Though in my case it only needs a simple pyramid code change to come to a clean

Re: [pylons-discuss] determinate if app object is the server or created from a console script

2023-10-18 Thread Arndt Droullier
Sorry for the confusion. I was mislead. My previous mail does not refer to the Pyrmid ApplicationCreated Event, but a custom one. This won't work. Arndt. Am Mi., 18. Okt. 2023 um 16:19 Uhr schrieb Arndt Droullier : > If you have access to the request object you can check req.environ to find >

Re: [pylons-discuss] determinate if app object is the server or created from a console script

2023-10-18 Thread Arndt Droullier
If you have access to the request object you can check req.environ to find out what is going. E.g. REMOTE_HOST or SERVER_NAME are different if you are using a proxy server or bin/prequest via commandline. Details depend on your setup. In case you don't have the request object you can use

[pylons-discuss] Re: HTTP 503 with Apache/mod_wsgi

2023-10-18 Thread Thierry Florac
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 -- https://www.ulthar.net -- http://pyams.readthedocs.io Le mer. 18 oct. 2023 à 08:44, Thierry Florac a écrit : > Hi! > I have a problem with a Pyramid

[pylons-discuss] HTTP 503 with Apache/mod_wsgi

2023-10-18 Thread Thierry Florac
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