All Questions

Tagged with
Filter by
Sorted by
Tagged with
27 votes
2 answers
21k views

How many processes should I specify in a WSGIDaemonProcess while running Django through mod_wsgi?

Let's say I have 2 sites(Superuser and Serverfault) running from their own Apache virtual host on one box. The 2 sites are powered by Django and are running on Apache with mod-wsgi. A typical ...
Thierry Lam's user avatar
  • 6,271
18 votes
5 answers
27k views

WSGI : Truncated or oversized response headers received from daemon process

System Configuration : Apache2, Django 1.10, Python 3, Ubuntu 16.04 LTS Django debug=True. /var/log/apache2/error.log [52:53.057967] [wsgi:error] [pid 4303] [client 1.1.1.22:24409] Timeout when ...
Suraj's user avatar
  • 449
14 votes
4 answers
3k views

Deploying Django App with Nginx, Apache, mod_wsgi

I have a django app which can run locally using the standard development environment. I want to now move this to EC2 for production. The django documentation suggests running with apache and ...
JCWong's user avatar
  • 241
10 votes
2 answers
4k views

High CPU load on Django/Apache/mod_wsgi site

Load testing a django 1.21/Apache/mod_wsgi configuration on an AWS small instance (Ubuntu 10.04) with Apache bench is showing extremely high CPU load (using uptime and vmstat) at low concurrent ...
litterbug's user avatar
  • 121
8 votes
1 answer
45k views

Python/Django/WSGI/Apache - "ImportError: No module named site"

I am trying to use a django application on my local ubuntu machine. However the site doesn't work and my /var/log/apache2/errors.log is filled with messages like this: ImportError: No module named ...
Amandasaurus's user avatar
  • 31.6k
7 votes
1 answer
40k views

How to get nginx to pass HTTP_AUTHORIZATION header to Apache

Am using Nginx as a reverse proxy to an Apache server that uses HTTP Auth. For some reason, I can't get the HTTP_AUTHORIZATION header through to Apache, it seems to get filtered out by Nginx. Hence, ...
codeinthehole's user avatar
6 votes
1 answer
11k views

Django with Apache and mod_wsgi: no system log unless setting Debug = True

I'm using apache web server and mod_wsgi to transfer request to django. $ apache2ctl -v Server version: Apache/2.4.10 (Raspbian) Server built: Sep 17 2016 16:40:43 I'm using this apache site to ...
Thomas's user avatar
  • 61
5 votes
4 answers
13k views

Make mod_wsgi use python2.7.2 instead of python2.6?

i am running Ubuntu 10.04.1 LTS and it came pre-packed with python2.6 but i need to replace it with python2.7.2. (The reason is simple, 2.7 has a lot of features backported from 3 ) i had ...
guron's user avatar
  • 51
5 votes
2 answers
2k views

Broken URL rewriting on Django/modwsgi setup

I am trying to setup my Django app to run under Apache with modwsgi. I have defined the following virtualhost: <VirtualHost *> ServerName www.domain.com ServerAlias domain.com ...
user avatar
4 votes
2 answers
3k views

How can I run two Django versions in the same server?

i've got two web apps. One was developed using Django 1.0 and the other using Django 1.4. How can I run both apps in the same apache2 server using two versions of django? Somebody told me something ...
Liam's user avatar
  • 241
3 votes
1 answer
1k views

Django + Apache + mod_wsgi: Why is wsgi script executed multiple times?

I'm relatively new to all the server technology and I followed this tutorial to deploy my django app on an Apache Webserver, using mod_wsgi: http://thecodeship.com/deployment/deploy-django-apache-...
basilikum's user avatar
  • 217
3 votes
1 answer
5k views

How to debug Django/WSGI/Apache errors

I have a Django 1.11.17 application deployed on Apache 2 and WSGI, Python 2.7. Apache shows an error "Truncated or oversized response headers received from daemon process" I have checked the ...
Jose Luis de la Rosa's user avatar
3 votes
1 answer
6k views

Apache2 mod_wsgi python 2.6 Django very slow

I've tried about 1000x things, but I can't seem to figure out why a simple django website is slow using apache 2.2.14/wsgi latest / django 1.3. I've confirmed the problem isn't our database by turning ...
Jonathan S. Fisher's user avatar
3 votes
1 answer
3k views

File upload issue with Django app running under Apache/mod_wsgi when daemonized

I've got a Django app running under Apache2 (linux) using mod_wsgi and file uploads fail when running in daemon mode but works when the python interpreter is embedded. Any idea what could be causing ...
Tom's user avatar
  • 2,652
3 votes
1 answer
1k views

Django site performance problem

my mod_wsgi/django app has ~2s response time with or without memcached in-memory caching. response is the same 2s with or without DNS resolution (i.e. with direct IP request) for comparison, a ...
Evgeny's user avatar
  • 599
3 votes
1 answer
920 views

Deploying a Django application in a virtual Ubuntu Server

I have a virtualbox machine running Ubuntu Server 10.04LTS. My intention is to this machine to work like a VPS, this way I can learn and prepare for when I get a VPS service. Apache+mod_wsgi for ...
mfsaint's user avatar
  • 201
3 votes
2 answers
12k views

Python: ImportError: No module named os [closed]

error_log ... [Fri Sep 07 16:30:14 2012] [error] import os [Fri Sep 07 16:30:14 2012] [error] ImportError: No module named os -shell- [root@lts5srv1 home]# ldd /root/epd-5.1.0/bin/python ...
Kreshnik's user avatar
  • 155
2 votes
5 answers
7k views

How do I find the Python executable that my server is using?

I'm new to Linux. I'm managing a (Linux - Apache - mod_wsgi - Django) server, where there are multiple installations of Python. The site is currently working, but I want to find out which executable ...
Ram Rachum's user avatar
  • 5,241
2 votes
2 answers
684 views

my first "production" debian server configuration

I have been using Debian for a year, mostly as the distro for my internal company server. Now I am making a public e-commerce website and I am planning to use a dedicated Debian server at a datacenter ...
user avatar
2 votes
1 answer
4k views

Can I configure apache/mod_wsgi so that the Alias URL path is not stripped before it reaches my Django app?

I am trying to configure Apache to host a Django webservice and a PHP website. All URLs with the pattern www.mysite.com/api should be directed to the Django service. All other URLs (e.g. www.mysite....
David Jones - iPushPull's user avatar
2 votes
4 answers
7k views

Setting environment variables in mod_wsgi for Django

I'm running Django on an RHEL instance under Apache/mod_wsgi, and I'm having issues setting some environment variables for the Python process. All of the components (Apache, Python, mod_wsgi, ...
Michael C. O'Connor's user avatar
2 votes
1 answer
4k views

Django mutli-threading on apache/mod_wsgi/windows

I am quite new to the combination of apache and django and quite naive frankly regarding to how multi-threading is handeled. Specifically I run on a windows server, so I know the MPM is only thread-...
Ilan lewin's user avatar
2 votes
1 answer
4k views

Fine tuning Django Apache mod_wsgi

First off I am looking for some help setting up my Django and Apache settings to fine tune it for my site for the best performance cost effectiveness. Server info: Django 1.3 Webfacion server, 80mb ...
pllee's user avatar
  • 121
2 votes
2 answers
11k views

mod_wsgi not working on Apache 2.4.12 64 bit on Windows 7 [closed]

I'm running Apache (Haus) 2.4.12 64 bit on Windows 7 64 bit. Python 2.7.9 64 bit is installed. Apache is running flawless if I don't try to load mod_wsgi. I downloaded mod_wsgi.so from this site. I ...
renatov's user avatar
  • 163
2 votes
1 answer
3k views

Running multiple Django projects within Apache, sys.path being over written

I have been trying to research how to do a multiple Python / Django deployment using Apache VirtualHosts. The issue I am encountering seems straight forward, ImportError: Could not import settings '...
Tim's user avatar
  • 23
2 votes
1 answer
3k views

django mod_wsgi memory problem

I have my django application on a VPS server (128mb ram) When i start it with python manage.py runserver, it works perfectly, but if I try to use it over apache/mod_wsgi it causes major slowdown very ...
dabrorius's user avatar
2 votes
3 answers
4k views

How to debug slow queries in Django+Postgres

My database queries from Django are starting to take 1-2 seconds and I'm having trouble figuring out why. Not too big a site, about 1-2 requests per second (that hit Django; static files are just ...
lacker's user avatar
  • 181
2 votes
1 answer
2k views

Deploying django website only for local network?

I developed a website with Django and I am deploying it with apache and mod-wsgi (as explained here). The catch is that I want to make sure that this website is accessible only on my local network. ...
a06e's user avatar
  • 373
2 votes
1 answer
5k views

virtualenv Failed to map segment from shared object: Permission denied

When SELinx is in permissive the Django webapp runs fine with no alerts. The below error appears in the Apache error log, once SELinux is set to enforcing, but no alerts are logged to audit.log. [...
Kevin's user avatar
  • 314
2 votes
1 answer
687 views

Apache, mod_wsgi, Django Error When Not SSH'd In To Server

I'm getting some strange errors that I've worked through to this point. I have an Ubuntu server setup with Apache + mod_wsgi + Django. When I'm SSH'd into the server, I can access the website fine ...
tehdiplomat's user avatar
2 votes
1 answer
2k views

apache+mod_wsgi configuration for django project(s) on a quad core

I've been experiment quite some time with a "typical" django setting upon nginx+apache2+mod_wsgi+memcached(+postgresql) (reading the doc and some questions on SO and SF, see comments) Since I'm still ...
Stefano's user avatar
  • 773
2 votes
2 answers
2k views

Deploying Django with mod_wsgi

/etc/apache2/site-available/mysite.com <VirtualHost my_ip_here:80> ServerAdmin [email protected] ServerName mysite.com ServerAlias www.mysite.com WSGIScriptAlias / /srv/www/...
Fred Collins's user avatar
2 votes
2 answers
3k views

Django Apache WSGI - very slow production server

I'm scratching my head on this one. Django is installed on my production and dev servers but the live server under not ver heavy load is running extremely slow. Every page is taking more than 30 ...
Derek Organ's user avatar
2 votes
1 answer
3k views

How to configure ReviewBoard with mod_wsgi and Apache in non-root location

I'm trying to configure ReviewBoard on a Mac running OS X Leopard (10.5.8) with Python 2.5 and mod_wsgi 3.3 installed. I'm using sqlite and the standard Apache 2 that comes with OS X; the document ...
Quinn Taylor's user avatar
2 votes
1 answer
539 views

Django Deploy Reccomendations

I have a Web application provided in SaaS way... (each client has his own sub-domain and his own database). My app uses Django Python and Postgresql. Right now is hosted on a linux shared hosting ...
quarry32's user avatar
  • 255
2 votes
1 answer
834 views

Deploying Django application as Wordpress subpage (at sub url), mod-wsgi

I have a Wordpress blog, let's say that it's address is like yakblog.org and it is a Wordpress blog installed on Ubuntu 12.04 server. Now, I would like to run a Django application as one of the sub ...
yak's user avatar
  • 113
2 votes
1 answer
2k views

Getting error while install mod_wsgi on centos6.3 with python 2.7

In initially installed yum install mod_wsgi and i think it was linked with python 2.6 Now is there any way to link it with 2.7 I tried configuring from the source and i get this error apxs -c -I/...
Mirage's user avatar
  • 571
2 votes
1 answer
1k views

django, mod_wsgi, MySQL High CPU - Problems

I am having a problem with an OSQA site. It is Django/Apache/mod_wsgi configured site. Every hour, the CPU spikes to 164% (Average) for task HTTPD. After 10 minutes, it frees back up. I have reviewed ...
Red Rover's user avatar
2 votes
2 answers
2k views

django + wsgi + suexec + userdir + apache?

I've got a django 1.1 website I want to run in wsgi (as that seems to be the recommended deployment on apache). I want it to run as the www user (apache is running as www-data). I would ideally like ...
Jayen's user avatar
  • 1,867
2 votes
1 answer
3k views

Uploading file > 1 MB on Django admin gives 400 Bad Request response

I have a small Django (1.2.x) project deployed on Apache (2.x) via mod_wsgi (3.x). In the admin, if I upload a file < 1MB, I can get it through; however, for a file, say, 1.2MB in size, I get a 400 ...
ayaz's user avatar
  • 483
2 votes
1 answer
827 views

Serving arbitrary subdomains using apache2, mod_wsgi and django

I'm attempting to setup a django development server using a sandbox approach. The specific technologies in place are apache2, mod_wsgi and django. I'd like to use subdomains formatted as: {project}-{...
Adam Hobson's user avatar
2 votes
2 answers
1k views

One of my apache processes is huge - how can I find out why?

I'm running Apache 2.2.12 with mod_wsgi, hosting a Django site. Most of the apache child processes weigh in at about 125MB RSS, but occasionally I see one child balloon to > 1GB RSS. At this point ...
Malcolm Box's user avatar
2 votes
1 answer
2k views

HTTP 503 errors with Apache and mod_wsgi

I have written a webapp in Django that I host under Apache 2.4 using mod_wsgi. At first glance, it works fine. However, when the Apache process has been running for a while, the webapp starts ...
Compizfox's user avatar
  • 384
2 votes
1 answer
3k views

Is graceful restart of Apache forcing to reload all python modules handled by mod_wsgi?

If I want to be sure that all python modules are recompiled and reloaded in my Django project under mod_wsgi and Apache, is it enough to restart apache gracefully with: /etc/init.d/apache graceful ...
Aidas Bendoraitis's user avatar
2 votes
1 answer
320 views

speeding up django server

My setup is django 1.3 and the default mod_wsgi and apache packages for ubuntu 10.04. I tested one view of my app on my development VM (DEBUG and debugging toolbar off): ab -n 200 -c 5 http://127.0.0....
asciitaxi's user avatar
  • 143
2 votes
1 answer
3k views

Apache not serving my python app

So here's my apache config: LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so <VirtualHost *:80> ServerAdmin marijus.merkevicius@gmail.com ServerName 31.220.49.197 ...
Marijus's user avatar
  • 121
1 vote
1 answer
9k views

Django 2.1 deployment on centos 7 with apache, mod_wsgi, python3 venv

I've stumbled with this seemingly most relevant deployment option because guides seem to either reference mod_wsgi with python2, or deployment on deb based systems where expected paths are different. ...
J D's user avatar
  • 163
1 vote
3 answers
801 views

Why, when everything is working properly, an apache restart writes into error.log?

This is just a minor nitpic, but I wonder if anyone can tell me the reason - when I restart apache, these lines get written into /var/log/apache2/error.log [Thu Mar 24 10:20:56 2011] [warn] mod_wsgi: ...
ripper234's user avatar
  • 5,930
1 vote
2 answers
400 views

Too many sites on apache

I have a server with too many virtual hosts, about 500 virtual hosts, half of this with SSL. All this hosts are served with mod_wsgi for Django applications. I notice that after a certain number of ...
Gui's user avatar
  • 59
1 vote
2 answers
5k views

Tuning django based site deployed using apache wsgi for better performance

I'm running django application using apache+mod_wsgi, I have setup 6 medium ubuntu servers on Amazon ec2 in which 2 for mongo and 4 for django and apache, using ebs for postgresql and configured a ...
user969923's user avatar