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

5
votes
0answers
2k views

Apache/wsgi “Script timed out before returning headers”

I have a custom Django app that's becoming unresponsive roughly every 5,000 requests. In the apache logs, I see see the following: Apr 13 11:45:07 www3 apache2[27590]: **successful view render here** ...
2
votes
0answers
21 views

Not seeing Django logs on Heroku

I'm not seeing log entries (at a level of INFO) made by Django in my Heroku logs. This is my configuration: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'filters': { ...
2
votes
0answers
137 views

How to deploy django with uWsgi and nginx on CentOS

My version of Django is 1.6.3 I downloaded uwsgi-2.0.4. Someone says installing uwsgi with command make while someone use python setup.py build. What exactly is the difference? I saw a tutorial that ...
2
votes
0answers
275 views

Application reports timeouts. However nginx has no record or log

We are serving Django via nginx/uwsgi. We use AWS ELB behind a VPC. This is a webservice to Mobile clients. We had reports of timeouts during development so we have added a concept of a request_id ...
1
vote
0answers
1k views

upstream timed out (110: Connection timed out) while reading response header from upstream

For some reason, I am getting this error whenever I am running a query on my server. On my local setup, this query takes around 7-8 seconds to return, but it keeps timing out on my actual server. ...
1
vote
0answers
95 views

Error message before downtime: posix_memalign(16, 4096) failed (12: Cannot allocate memory)

I have a server running Django on top of Gunicorn and Nginx, and I experienced a small amount of downtime last night. After restarting Nginx and Gunicorn the server went back to normal, but I can't ...
1
vote
0answers
241 views

Ubuntu Locales Incorrect for Python Application

I have a NGINX -> UWSGI -> Django(python) stack installed on an Ubuntu AMI on Amazon EC2. I've run into a problem when accessing a file with unicode characters in the name. The exact output from the ...
1
vote
0answers
45 views

How to tell apache to look for last modified date before serving an old modified HTML file?

On certain requests my Django application updates static HTML files. However apache is serving them old copy from its cache... How can I configure Apache to make sure serve latest file changes.. ...
1
vote
0answers
176 views

Varnish server in front of nginx server with multiple virtualhosts

I have tried to search for a solution for this, but can't find any documentation/tips on my specific setup. My setup: Backendserver: ngnix: 2 different websites (2 top domains) in virtualenv, ...
1
vote
0answers
73 views

How do I allow www-data to (negatively) change the niceness of a process in Linux?

So I'm running a website using django and sometimes I call scripts located on the server by spawning a subprocess in python. When looking at the processes with "top" I see these are called under the ...
1
vote
0answers
91 views

“Error importing middleware” while upgrading to Django 1.5 from Django 1.4?

I have a shared hosting account with Python 2.7.2 installed. I have done a local installation of Django 1.4 (python setup.py install --user) and everything was working fine. I decided to upgrade to ...
1
vote
0answers
276 views

Python Threads and uWSGI Harakiri

I have a webapp that is using an API built on nginx, uWSGI, and Django. Recently I have been seeing a lot of harakiris on a particular API call which does some quick processing and then spawns a few ...
1
vote
0answers
493 views

upstream sent more data than specified in “Content-Length” header while reading upstream

I have django app (based on Mezzanine). My nginx conf looks like: upstream myhost { server 127.0.0.1:8000; } server { listen 80; server_name www.myhost.ru myhost.ru; ...
1
vote
0answers
157 views

Strange Django/Apache 500 error when loading dynamically generated images (sometimes)

I have a really strange Http500 error when loading dynamically generated images. And for some reason it only happens sometimes. The apache error log doesn't show any errors. The django development ...
1
vote
0answers
295 views

Nginx > Varnish > Gunicorn Error Too many Redirections

I have the following config: Nginx > Varnish > Gunicorn > Django I want to cache 2 versions of same site (mobile & web) with Varnish. Gunicorn : WEB: gunicorn_django --bind 127.0.0.1:8181 ...
1
vote
0answers
92 views

Deploy multiple django instances on one Host

I am trying to setup multiple Django instances on one Host with lighttpd. My problem is to get Djangos FCGI working on subdirectories served by my Webserver. So my aim is the following: ...
1
vote
0answers
211 views

Stress testing Django app - how to improve throughput?

I'm having my first attempt at stress testing a simple django web app running from gunicorn and nginx which I’ve put on a small 256MB Rackspace Cloud server. Using httperf, I increase the number of ...
1
vote
0answers
62 views

How can I get Pinax's OpenID to work with NAT?

I have a Pinax gunicorn deployment behind a NAT, where the outward-facing Apache server does a ReverseProxy to the gunicorn server. Overall it works well but when I try to log in with OpenID I get an ...
1
vote
0answers
127 views

Lighttpd + django on gentoo 10 seconds to answer

I want to run a Django site on a lighttpd with fastcgi on a gentoo machine. Everytime I try to access the site I get a response after more or less exactly 10 seconds. Im using a socket to let lighttpd ...
1
vote
0answers
113 views

Apache conf changes when migrating django project from mod_python to mod_wsgi

Not sure if this is the right place to ask this question, but I'm migrating a django project from mod_python to mod_wsgi and I want to make sure I have my apache configuration correct. The old ...
1
vote
0answers
549 views

cx_Oracle - InterfaceError: Unable to acquire Oracle environment handle

I have installed Django on Ubuntu 12.04 behind NGINX with uWSGI. I use Postgresql as the main database for the application however I need to retrieve some data from an Oracle database. I have ...
1
vote
0answers
75 views

Server returning response for previous requests

It's a really strange problem. I believe it to be a server issue, but it's so strange and hard to reproduce that I'm not entirely sure. Just as the title says I'm receiving responses for earlier ...
1
vote
0answers
278 views

DB encryption for Django web app without storing key on server

We are setting up a virtual private server (not hosted by us), on which we will be user testing our Django-based web application. The user-generated content produced in these tests will be very ...
1
vote
0answers
310 views

django url matching with Lighttpd fastcgi

I have a problem with url. I can access the djando app home page ( localhost/djangotest/ ) but can't access the admin section ( localhost/djangotest/admin/ ). I can access it using the django server ...
1
vote
0answers
120 views

Django - can't get production web server running

I'm trying to deploy a Django app in production, on an apache server, using mod-wsgi. mod-wsgi is installed and working fine. When I run the Django server, it launches fine, but I can't access it on ...
1
vote
0answers
260 views

django, fastcgi, throws random 404 errors

I have a django website deployed on a shared webhost. The shared webhost uses fastcgi. I'm noticing that valid urls will randomly throw up http404 but as soon as I refresh will work again. does anyone ...
1
vote
0answers
338 views

(Linux) Python is stopped - preventing me to start a Service

I'm currently running CentOS 5.5 on my machine, and I'm trying to setup a Build Server using Django, MySQL and Apache. I have basically no experience with any of those, and I've been researching on ...
1
vote
0answers
120 views

Browsers can't handle the real time updates my app is sending, slows everything waay down

Posted this a couple days ago, have made some more progress. Thanks for the help, this is delaying our launch and I'm under a lot of pressure. UPDATE: I don't think it's the server side, I think ...
1
vote
0answers
111 views

Shell Script to deploy Django

I have yet to find an Amazon Web Services AMI that deploys a Django environment. I want to deploy with mod_wsgi and also include modules like markdown, lxml, beautiful soup, PIL, and others. Is ...
1
vote
0answers
586 views

OSError : [Errno 38] Function not implemented - Django Celery implementation

I installed django-celery and I tried to start up the worker server but I get an OSError that a function isn't implemented. I'm running CentOS release 5.4 (Final) on a VPS: . broker -> ...
0
votes
0answers
6 views

Django-mailer emails stuck in queue

I have been using the Django-Mailer app for a few years on my large, corporate Django driven web application. I use it to send a custom email to each of our 800 clients. Generally, it has worked well. ...
0
votes
0answers
12 views

Nginx blocks http response with long string

I encountered a issue with my live web service today. The backend setup is Nginx + Django webservice. In the webservice, I have code to return a HttpResponse with a long JSON string (> 1400 char). ...
0
votes
0answers
20 views

Graphite SQLite3 DatabaseError: attempt to write a readonly database

Running graphite under apache httpd, with slqite database, I have the correct folder permissions [root@liaan55 httpd]# ls -ltr /var/lib | grep graphite drwxr-xr-x. 2 apache apache 4096 ...
0
votes
0answers
33 views

Django wsgi and mod_pagespeed not working

I installed mod_pagespeed on my server and it's working as far as the page header is concerned: X-Mod-Pagespeed:1.7.30.5-3847 The problem is that it's doing nothing else. No whitespace or comment ...
0
votes
0answers
141 views

Apache error log with django application showing “strange” error

My django code was previously in /var/www and all worked just fine. Yesterday, I decided to move the code in /root and keep the static files in /var/www for security purposes. I am using Django 1.6.5 ...
0
votes
0answers
25 views

Djapian in Ubuntu trusty

I'm trying to migrate my Django server to a new server running Ubuntu trusty (the last one ran lucid). I've got almost everything working except for Djapian: when I run python manage.py index ...
0
votes
0answers
54 views

Server configuration in production for Django applications

I want to deploy my Django project to production as follows: example.com # redirect to www www.example.com # for dynamic files static.example.com # for static files media.example.com ...
0
votes
0answers
64 views

Apache single sign on redirecting to success login page, Django application

All I have a Django web application with relative paths url. For instance, I have www.example.com/inventory/get_item/?item_id=5 In the apache configuration I am using oracle single sign on to ...
0
votes
0answers
23 views

Installing PySide on an Amazon EC2 Instance Running Django

So I realize my title is almost laughable, but my situation is this. I have a fairly complicated desktop app written in Python and the PySide Qt bindings and I need to make a stripped down version of ...
0
votes
0answers
61 views

CenOS 6.5 Apache 2.2 Django Project gives / 403

I have Apache 2.2 running over CentOS 6.5 for first time. I faced no problem with Ubuntu with configurations below, but on CentOS always giving me 403 error. The example.com domain is living under ...
0
votes
0answers
54 views

restart nginx after modifying settings.py and urls.py

In my django project, I modified the files settings.py and urls.py. My web application runs on nginx server. I reloaded the server using the following command: /etc/init.d/nginx reload But the ...
0
votes
0answers
31 views

Adding extra header using middleware module in django

I was trying to log the user-name in the nginx logs. As I am not doing basic http authentication, adding $remote_user in log_format doesn't work. I will need my application to tell Nginx what the ...
0
votes
0answers
48 views

Can't run django with lighttpd and FCGI

I'm trying to run django on lighttpd but I'm not able to do it. In logs I see this: 2014-05-30 13:45:32: (log.c.166) server started 2014-05-30 13:45:32: (mod_fastcgi.c.1103) the fastcgi-backend ...
0
votes
0answers
112 views

Apache django and tomcat

I have one app running on tomcat6 and a website running with django I would like that if the user write 127.0.0.1/manager/html --> redirect on tomcat otherwise redirect on django Here is my apache ...
0
votes
0answers
46 views

Run Django on Gunicorn with Python 3.3

How would one go around to run Django on Gunicorn using Python 3.3 on an Ubuntu 12.04 LTS Server? As Ubuntu 12.04 LTS is dependend in Django 2.7, Python 3.3 has to be installed side-by-side with ...
0
votes
0answers
205 views

Connection refused while connecting to upstream from nginx to gunicorn_django

I'm trying to get my server back online after an upgrade, and I can no longer seem to get Nginx to direct calls to Gunicorn - every request I send to the site gets back a 502 Bad Gateway. I have ...
0
votes
0answers
241 views

Django, Nginx & Gunicorn - strange server crash

My server had an outage over the weekend, in which every user got a 500 internal server error and the site was inaccessible. Restarting Gunicorn and Nginx solved the problem, and checking the logs I ...
0
votes
0answers
65 views

nginx and gunicorn configuration test using ab-BenchMark

I am using c1.medium (2 cores, 2gb) with nginx web server and gunicorn app server.I am running this with 5(2*cores+1) gunicorn workers. how can i improve my server performance??? Here is my nginx ...
0
votes
0answers
26 views

How to secure django powered site on IIS 8.0

I have setup a django site using Helicon Zoo with IIS 8.0 on Windows Server 2012. My site includes the /admin, and I want secure only the admin with HTTPS. I have been searching on the Web for a ...
0
votes
0answers
217 views

setup nginx to serve django and wordpress blog as subdirectory

upstream django { server unix:///home/ubuntu/web/www.mysite.com/uwsgi-tutorial/mysite/mysite.sock; # for a file socket } server { listen 80; server_name mysite.com www.mysite.com; ...