Possible issue in deploy TG2.4.3 with mod_wsgi 4.9.0

43 views
Skip to first unread message

cap...@gmail.com

unread,
Jan 31, 2022, 6:28:43 AM1/31/22
to TurboGears
Hello to everyone,

I am facing a issue in deploying a TG2.4.3 application using mod_wsgi 4.9.0.

I made a lot of tests and I am starting to think that may be something wrong with TurboGears itself. As a first test I have been able to deploy a simple WSGI application (copy/past from the mod_wsgi documentation), apache is capale to successfully server the application.

Then I wrote a simple pastedeploy configuration:
test.ini content:
[app:main]
use = egg:Paste#static
document_root = %(here)s/test

[loggers]
keys = root

(...)

app.wsgi content (from TG documentation):
APP_CONFIG = "/var/www/myapp/test.ini"

import logging.config
logging.config.fileConfig(APP_CONFIG)

from paste.deploy import loadapp
application = loadapp('config:%s' % APP_CONFIG)

Again Apache starts with no error and is capable to server the statis content (Paste#static).

The problem arise when i start with mod_wsgi the Wiki20 quikstart project.

Using wsgiref (with gearbox) everything start perfectly fine, but it does not with Apache.

Some information of my setup:
Python 3.7.12
Apache 2.4.52 (Debian)
mod_wsgi 4.9.0

Some line from my log:
[Mon Jan 31 09:44:03.730688 2022] [mpm_prefork:notice] [pid 39785] AH00163: Apache/2.4.52 (Debian) OpenSSL/1.1.1k mod_wsgi/4.9.0 Python/3.7 configured -- resuming normal operations
[Mon Jan 31 09:44:03.730770 2022] [core:notice] [pid 39785] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 31 09:44:03.916407 2022] [wsgi:info] [pid 39786] mod_wsgi (pid=39786): Attach interpreter ''.
[Mon Jan 31 09:44:03.990769 2022] [wsgi:info] [pid 39786] mod_wsgi (pid=39786): Adding '/var/www/myapp/venv/lib/python3.7/site-packages' to path.
[Mon Jan 31 09:44:04.013458 2022] [wsgi:info] [pid 39786] mod_wsgi (pid=39786): Imported 'mod_wsgi'.
[Mon Jan 31 09:44:04.013526 2022] [wsgi:info] [pid 39786] mod_wsgi (pid=39786, process='myapp', application=''): Loading Python script file '/var/www/myapp/wiki20/app.wsgi'.
mremap_chunk(): invalid pointer

On this configuration instead i am facing no issue:
Python 3.6.9
Apache 2.4.25 (Debian)
mod_wsgi 4.7.1

Is someone facing the same issue?

Thanks all for reading.
Giovanni.

cap...@gmail.com

unread,
Jan 31, 2022, 11:58:24 AM1/31/22
to TurboGears
After digging around on my setup I see that the quickstart wont start on apache even on mod_wsgi 4.7.1 only if you use MongoDB (with ming of course).

Using sqlalchemy everything seems fine.

cap...@gmail.com

unread,
Feb 1, 2022, 10:12:31 AM2/1/22
to TurboGears
After a while I have been able to fix this issue for me.

On my setup I have installed also php7.4 on the same server, if you do please do not install php-xmlrpc. That library (not sure why) was creating all the issues.

Hope this can help someone else too.

Regards.
Reply all
Reply to author
Forward
0 new messages