Alessandro Candini | 10 Feb 12:00
Picon

Thread local storage issue under Apache

Hi everyone.

I have a django project in where I've added a custom .py file which 
launches a shell command (a GDAL utility to manipulate shapefiles):
subprocess.call(["ogr2ogr", "-t_srs", "EPSG:900913", shpGoogle, shpOrig])

If I run the function containing this command using django web server 
everything works fine and my new file have produced and stored on the 
filesystem.

But if I run the same application under the Apache web server, I get the 
following error:
Fatal Python error: Couldn't create autoTLSkey mapping

Do you have any idea on how to solve this?

Thanks in advance

Configuration details follows...

I'm using Apache/2.2.20 on Ubuntu-11.10 mod_wsgi-3.3 Python-2.7.2 
django-1.3.1

My django.wsgi file is the following
import os, sys
sys.path.append('/home/candini/Repos/CanetaRepo/tmp/STO')
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

(Continue reading)

Tom Evans | 10 Feb 13:11

Re: Thread local storage issue under Apache

On Fri, Feb 10, 2012 at 11:00 AM, Alessandro Candini <candini <at> meeo.it> wrote:
> Hi everyone.
>
> …
>
> But if I run the same application under the Apache web server, I get the
> following error:
> Fatal Python error: Couldn't create autoTLSkey mapping
>
>…
>
> I'm using Apache/2.2.20 on Ubuntu-11.10 mod_wsgi-3.3 Python-2.7.2
> django-1.3.1
>

Wait for python 2.7.3 to be released...

http://bugs.python.org/issue13156
http://groups.google.com/group/modwsgi/browse_thread/thread/d6f929486f4eeb1?tvc=2&pli=1

Cheers

Tom

--

-- 
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

(Continue reading)

Alessandro Candini | 10 Feb 14:37
Picon

Re: Thread local storage issue under Apache

On 02/10/2012 01:11 PM, Tom Evans wrote:
> On Fri, Feb 10, 2012 at 11:00 AM, Alessandro Candini<candini <at> meeo.it>  wrote:
>> Hi everyone.
>>
>> …
>>
>> But if I run the same application under the Apache web server, I get the
>> following error:
>> Fatal Python error: Couldn't create autoTLSkey mapping
>>
>> …
>>
>> I'm using Apache/2.2.20 on Ubuntu-11.10 mod_wsgi-3.3 Python-2.7.2
>> django-1.3.1
>>
> Wait for python 2.7.3 to be released...
>
> http://bugs.python.org/issue13156
> http://groups.google.com/group/modwsgi/browse_thread/thread/d6f929486f4eeb1?tvc=2&pli=1
>
> Cheers
>
> Tom
>
Nice to know, but at the moment I have solved in the following way:
as reported at 
http://groups.google.com/group/modwsgi/browse_thread/thread/d6f929486f4eeb1?tvc=2
I have added the line "WSGIApplicationGroup %{GLOBAL}" in my 
/etc/apache2/sites-available/jsonopenlayers file reported above.

(Continue reading)


Gmane