Hello,

Did not realize I has posted the same problem from several years back.  I 
am again testing an app on a production machine, and having the same 
problem:

LOG START *********
[Wed Sep 20 14:59:55.524284 2017] [wsgi:error] [pid 28498:tid 
140503681038080] [client 73.91.138.217:50020]     from 
zope.sqlalchemy.datamanager import ZopeTransactionExtension, mark_changed, 
register, referer: demo.testsite.com

[Wed Sep 20 14:59:55.524351 2017] [wsgi:error] [pid 28498:tid 
140503681038080] [client 73.91.138.217:50020]   File 
"/var/tg2env/lib/python2.7/site-packages/zope.sqlalchemy-0.7.7-py2.7.egg/zope/sqlalchemy/datamanager.py",
 
line 15, in <module>, referer: demo.testsite.com

[Wed Sep 20 14:59:55.524407 2017] [wsgi:error] [pid 28498:tid 
140503681038080] [client 73.91.138.217:50020]     import transaction as 
zope_transaction, referer: demo.testsite.com

[Wed Sep 20 14:59:55.524467 2017] [wsgi:error] [pid 28498:tid 
140503681038080] [client 73.91.138.217:50020]   File 
"/var/tg2env/lib/python2.7/site-packages/transaction/__init__.py", line 19, 
in <module>, referer: demo.testsite.com

[Wed Sep 20 14:59:55.524518 2017] [wsgi:error] [pid 28498:tid 
140503681038080] [client 73.91.138.217:50020]     from 
transaction._transaction import Transaction, referer: demo.testsite.com

[Wed Sep 20 14:59:55.524560 2017] [wsgi:error] [pid 28498:tid 
140503681038080] [client 73.91.138.217:50020]   File 
"/var/tg2env/lib/python2.7/site-packages/transaction/_transaction.py", line 
112, in <module>, referer: demo.testsite.com

[Wed Sep 20 14:59:55.524610 2017] [wsgi:error] [pid 28498:tid 
140503681038080] [client 73.91.138.217:50020]     from transaction import 
interfaces, referer: demo.testsite.com

[Wed Sep 20 14:59:55.524665 2017] [wsgi:error] [pid 28498:tid 
140503681038080] [client 73.91.138.217:50020] ImportError: cannot import 
name interfaces, referer: demo.testsite.com

LOG STOP *********

I have tried the different transactions, 1.4.0 -> 1.1.1, and have the same 
problem.  Suspect it is a WSGI configuration problem.  Here is my *.conf:

Listen 8080
<VirtualHost *:8080>
        ServerName production.testsite.com

        #WSGIDaemonProcess production.testsite.com processes=2 threads=15 
display-name=%{GROUP} python-path=/var/tg2env/lib/python2.7/site-packages
        #WSGIProcessGroup production.testsite.com
        WSGIApplicationGroup %{GLOBAL}
        WSGIScriptAlias / /var/tg2env/testsite/apache/testsite.wsgi

        <Directory /var/tg2env/testsite/apache>
                Require all granted
        </Directory>

        RewriteEngine on
        RewriteCond %{SERVER_NAME} =production.testsite.com
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} 
[END,NE,R=permanent]
</VirtualHost>

Listen 8081
<VirtualHost *:8081>
        ServerName demo.testsite.com

        #WSGIProcessGroup demo.testsite.com
        #WSGIDaemonProcess demo.testsite.com processes=2 threads=15 
display-name=%{GROUP} python-path=/var/tg2env/lib/python2.7/site-packages
        WSGIApplicationGroup %{GLOBAL}
        WSGIScriptAlias / /var/tg2env/testsite/apache/testsite_demo.wsgi

        <Directory /var/tg2env/testsite/apache>
                Require all granted
        </Directory>

        RewriteCond %{SERVER_NAME} =demo.testsite.com
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} 
[END,NE,R=permanent]
</VirtualHost>

If I remember correctly, I just had a cron job restart the old server every 
so often; however, this is popping up every 10 requests or so, so can't do 
such a fix.

I also fought with the "RuntimeError: class.__dict__ not accessible in 
restricted mode", error.  Interestingly, the two always appeared together. 
 I believe that the __dict__ error was fixed by adding in the 
 WSGIApplicationGroup %{GLOBAL} (see 
https://stackoverflow.com/questions/10557930/mod-wsgi-error-class-dict-not-accessible-in-restricted-mode),
 
but the transactions import error continues. 

Are these related in any way?

Thanks for the help,

Shane

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to turbogears+unsubscr...@googlegroups.com.
To post to this group, send email to turbogears@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to