Django, "the web framework for perfectionists with deadlines", is a Python-based framework for creating web applications. With a powerful object-based database mapper, a clean syntax for mapping URLs to views, a simple template language and a convenient automatically generated administration ...

learn more… | top users | synonyms

4
votes
2answers
1k 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 ...
4
votes
1answer
1k views

Gracefully Restarting Django Celery Instances

I'm wondering what the best way to restart Celery is without losing any tasks during the restart. I'm currently running it as a daemon using the init.d/ script provided with celery - everything is ...
3
votes
1answer
478 views

What is wrong with this attempt to serve up static content? Does a Proxy/ReverseProxy trump Alias, or can I ask for Alias to trump proxy?

I'm working on getting Apache to serve up static files for a Django project. My VirtualHost has: Alias /static/ /home/jonathan/pragmatometer/static/ ProxyPass / http://localhost:8000/ ...
3
votes
2answers
890 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 ...
3
votes
3answers
588 views

Getting more database performance - postgresql

There is a django "web application" (from hell) we are hosting on a dedicated server. After some benchmarking I found that the "Application" is amazingly bad at database operations (refactoring is not ...
3
votes
1answer
2k views

Nginx + Django + FastCGI WSGI error? (Non fatal)

Hi everyone I am running django on top of nginx with fastcgi. When i do runfcgi, I am seeing these errors: python manage.py runfcgi daemonize=false host=127.0.0.1 port=8000 WSGIServer: missing ...
3
votes
1answer
449 views

Split the same virtualhost configuration across multiple files

I have multiple django applications on my server that run each within their own virtualhosts, bound to different ports. (I do this so as to isolate each WSGIProcessGroup). Now I would like to proxy ...
3
votes
3answers
553 views

Django: Nginx with WSGI or Apache with WSGI

Are there any studies comparing the performance (RPS, CPU, Memory usage etc) of delivering python web apps (Django in my case) between nginx and Apache? Can someone help me with facts? Which ...
3
votes
3answers
126 views

We are moving to two servers from one server due to performance issues. How do we monitor the value of this change?

We are moving to two servers from one server due to performance issues. We are moving our MySQL DB to its own dedicated server and will keep the original machine as the front end machine running ...
3
votes
3answers
3k views

gunicorn + django + nginx unix://socket failed (11: Resource temporarily unavailable)

Running very high volume traffic on these servers configured with django, gunicorn, supervisor and nginx. But a lot of times I tend to see 502 errors. So I checked the nginx logs to see what error and ...
3
votes
1answer
229 views

Document and best practices for configuration of a dedicated server (Centos) to serve just one website

I have just bought a dedicated server and they provide me a IP address, access info as root and machive with Centos 5. I would like to serve my django app in that machine but because I have no ...
3
votes
2answers
1k views

Nginx / uWsgi / Django site can handle more traffic with rewrite URL

I'm running a Django app, using uWsgi behind Nginx. I've been doing some performance tuning and load testing using ApacheBench and have discovered something unexpected which I wonder if someone could ...
3
votes
3answers
748 views

What's the optimal way to set up a Django server to serve multiple sites?

I currently use Apache 2.0 and FastCGI to serve my Django sites (I host multiple sites from a single server / IP). Each site has it's own FastCGI process which stops Apache forking multiple copies ...
3
votes
1answer
450 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: ...
3
votes
2answers
5k views

Nginx 502 bad gateway runing django in uwsgi

I tryed to restart a project in production and it stoped working. This is a django==1.5.1 and django-cms==2.4.1 project. I restarted because I've updated the project from django==1.4.1 to ...
3
votes
2answers
879 views

Is Amazon EC2 for me?

I'm working on an image hosting website tailored to a particular niche. The website is made with Django. I'm currently planning to run it on Linode. So far so good. The problem is: I will need to ...
3
votes
2answers
1k views

Attempting to run Django with start Apache2 mod_wsgi on Ubuntu Lucid Lynx without success

I have a small vps with a minimum install of ubuntu lucid-lynx with about 256mb memory, it's newly installed with nothing special running on it. I'm trying to deploy django to it, while I'm ...
3
votes
2answers
1k views

Apache : Map one virtualhost to a subdirectory of another virtualhost

I'm trying to map one virtual host to a subdirectory of another virtual host, something like this http://host2.com -> http://host1.com/host2. At this moment, whenever I go to http://host2.com it ...
3
votes
1answer
3k views

Django, wsgi, py. what's the difference?

I'm trying to get a django application up and running on my cpanel system. I've installed mod_wsgi, and am following the guide here: ...
3
votes
2answers
1k views

RHEL SELinux blocking Apache access to PostgreSQL

I'm running a Django app that uses PostgreSQL. The server is running RHEL 6.5 with SELinux. I'm having an issue where the Django app can't connect to the DB, and I think it's because SELinux is ...
3
votes
2answers
1k views

Apache mpm worker + wsgi Python/Django workers stuck

Our Apache+Django server has the problem that workers get stuck. It's an mpm worker model, and after some time, each process that serves some dozen worker threads has all its workers frozen: # ...
3
votes
1answer
373 views

Should production web servers use a gateway host for SSH in Django apps even though Fabric doesn't support it?

My firm manages a fairly large array of production servers across a number of servers. Our production server, by convention, only allow SSH access from a handful of gateway hosts. Most of these web ...
3
votes
1answer
2k views

virtualenv gcc error MySQL-python

I am trying to install MySQL-python through PuTTY with virtualenv. Specs. *CentOS-6.0 *Python2.6 So I have read many sites and the biggest thing I see is python-dev, and python-devel(btw I don't ...
3
votes
2answers
4k views

Apache : Making one virtual host subdomain/subdirectory of another virtual host

My setup is a bit awkward. I've got http://sub.main.com mapped to my server's IP but not the http://main.com. I am running two sites on my server(using different web frameworks). For each of those ...
3
votes
2answers
3k views

Server Clustering (Django, Apache, Nginx, Postgres)

I have a project deployed with django, Apache, Nginx and Postgres. The project has requirement of live data viewable to customers. The projects main points are: 1. Devices in field send data to ...
3
votes
1answer
710 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 ...
3
votes
1answer
564 views

Django: CONN_MAX_AGE persists connections, but doesn't reuse them with PostgreSQL

I've got a django setup are using Django 1.6.7 and Postgres 9.3 on Ubuntu 14.04 LTS. At any given time, the site gets about ~250 simultaneous connections to the PostgreSQL database, which is a Quad ...
3
votes
1answer
562 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 ...
3
votes
2answers
1k 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 ...
3
votes
1answer
814 views

Running fastcgi->php for a blog subfolder, while rest of site is fastcgi->django

Sort of an odd question but should be pretty easy to solve. I am developing a Django website right now and the client wants a Wordpress blog as well. Because we're under the gun and have other ...
3
votes
1answer
772 views

Analyze uwsgi strace log to find out why it takes high CPU usage

I'm running a django site with nginx through uwsgi. The problem is uwsgi process take a lot of CPU time when traffic become heavy. The same configuration works fine on test server and siege/ab ...
2
votes
2answers
1k views

Amazon EC2: Not able to open web application even if port it opened

I have a t1.micro instance with public dns looks similar to ec2-184-72-67-202.compute-1.amazonaws.com (some numbers changed) On this machine, I am running a django app $ sudo python manage.py ...
2
votes
3answers
3k views

Beginner installing first app on EC2 bitnami stack

Beginner question here. Its probably obvious to someone who does this stuff all the time. But I'm having difficulty setting up django running on an EC2 bitnami instance. I setup my server and I'm ...
2
votes
5answers
770 views

Lightweight web server for Django with small workloads

I'm writing a small app in Django that will be used as admin interface for a set of applications usually configured by text files. It won't do much (parse user input, convert db entries into flat ...
2
votes
5answers
346 views

Assuming I am not serving any static content, will I need to move away from Apache?

I currently run Apache + Django. Works great. Many people, especially this thread: Apache vs nginx vs lighttpd? Which is simpler to configure and administer? say that nginx/cherokee is the newer, ...
2
votes
5answers
5k views

Postgres used in Ubuntu 12.04

I am trying to get django running on an ubuntu 12.04 release using postgres (clean install). To get it running it used to be that you would have to edit the /etc/postgresql/9.1/main/pg_hba.conf file. ...
2
votes
2answers
648 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 ...
2
votes
2answers
864 views

Debugging nginx URL rewrite: How do I figure out where the problem is?

I have a specific URL pattern on a site which needs to be redirected to the HTTPS version. This is a Django site; Nginx checks each URL in memcached, and if it doesn't find a cached version it proxies ...
2
votes
3answers
712 views

Logging doesn't work after rsyslog upgrade

I have several different django applications under apache on a Red Hat server. These applications use SysLogHandler for sending log messages to the local rsyslog service. In order to pipe log messages ...
2
votes
1answer
1k views

How to reduce celeryd memory consumption?

I'm using celery 2.5.1 with django on a micro ec2 instance with 613mb memory and as such have to keep memory consumption down. Currently I'm using it only for the scheduler "celery beat" as a web ...
2
votes
1answer
2k 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 ...
2
votes
1answer
321 views

aws ec2 and Django ALLOWED_HOSTS

I have put in place my website using Django, on aws EC2, using Elastic Beanstalk. I have set the ALLOWED_HOSTS to ['www.mydomain.fr', '.mydomain.fr'], as recommanded on the Django website. But I ...
2
votes
1answer
599 views

How to run multiple websites from one Django project on nginx and uwsgi

How to run two web sites or subdomains of a site from a single Django code base. Each Django app in the project can then power a website on a different domain, but all the apps can still share a ...
2
votes
2answers
386 views

Any way to change the default umask for Apache2?

When Apache writes new files (static content, like writing to the cache file) it creates this file without the proper permissions. There's no write permission for the group by default and this causes ...
2
votes
1answer
3k 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 ...
2
votes
2answers
355 views

Django-Mailer won't stop sending emails

I set up Django Mailer and added the two commands to the crontab: * * * * * root python /srv/www/cpm/manage.py send_mail >> /srv/www/cpm/cron_mail.log 0,20,40 * * * * root python ...
2
votes
3answers
3k 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 ...
2
votes
4answers
2k views

Deploying django under a sub-URL with Nginx/Fastcgi

I can't for the life of me figure out how to deploy a django site under a non-root location with Nginx/fastcgi, e.g. localhost:8080/myproject/ instead of localhost:8080/; all the examples I have seen ...
2
votes
1answer
1k views

Using gentoo, how does one stick -9999 ebuild to a specific svn revision?

As an example given the django-9999 ebuild, to match a developer's environment I need to checkout R12120 from trunk. Installing Django manually is not an option due to package management reasons. But ...
2
votes
1answer
2k 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 ...