Reputation: 1380
I've got a Django project working on an Apache server.
I installed pandas and want to use it to start manipulating data - however something odd is happening.
Anytime I use the import pandas
on the production environment, the server will hang up and (after a while) throw a 408 timeout error.
I can comment out the pandas
portion and the server responds normally without issue. I can't recreate it in the development environment or command line interface with django.
Here are the httpd-app.conf
file:
Alias /tooltrack/static "C:/Users/myfolder/Bitnami Django Stack Projects/tooltrack/static/"
<Directory "C:/Users/myfolder/Bitnami Django Stack Projects/tooltrack/static/">
Options +MultiViews
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
</Directory>
WSGIScriptAlias / 'C:/Users/myfolder/Bitnami Django Stack projects/tooltrack/tooltrack/wsgi.py'
<Directory "C:/Users/myfolder/Bitnami Django Stack projects/tooltrack/tooltrack">
Options +MultiViews
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
</Directory>
<Directory "C:/Users/myfolder/Bitnami Django Stack projects/tooltrack">
Options +MultiViews
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
</Directory>
I know its hanging up on the import of pandas due to this:
def panda_dataframe_r():
print 'importing pandas ' + str(timezone.now())
import pandas
print 'import done ' + str(timezone.now())
I can see the importing pandas
in the log, however no following import done
Any help is greatly appreciated!!
Upvotes: 6
Views: 2218
Reputation: 58533
Try adding:
WSGIApplicationGroup %{GLOBAL}
Various of the scientific packages that it is going to need will not work in Python sub interpreters. That directive will force the use of the main interpreter context.
Upvotes: 16