Questions tagged [wsgi]

Web Server Gateway Interface (WSGI) is a standard for web applications written in Python.

The Web Server Gateway Interface (WSGI) is a simple calling convention for web servers to forward requests to web applications or frameworks written in the programming language. Applications, gateways and servers should use it to ensure interoperability.

WSGI is supported by many web frameworks, including , and .

2494 questions
63
votes
15 answers

How can I tell whether my Django application is running on development server or not?

How can I be certain that my application is running on development server or not? I suppose I could check value of settings.DEBUG and assume if DEBUG is True then it's running on development server, but I'd prefer to know for sure than relying on…
Imran
  • 87,203
  • 23
  • 98
  • 131
61
votes
13 answers

Django vs other Python web frameworks?

I've pretty much tried every Python web framework that exists, and it took me a long time to realize there wasn't a silver bullet framework, each had its own advantages and disadvantages. I started out with Snakelets and heartily enjoyed being able…
miniman
  • 1,887
  • 4
  • 15
  • 11
61
votes
12 answers

ImportError: No module named django.core.wsgi Apache + VirtualEnv + AWS + WSGI

I am trying to publish my site on an Amazon's EC2 Instance, and I keep getting a 500 error. I really don't know why. //Log Files [Sun Feb 17 23:12:48.066802 2013] mod_wsgi (pid=2102): Target WSGI script '/srv/www/app/poka/apache/wsgi.py' cannot…
abisson
  • 4,365
  • 9
  • 46
  • 68
57
votes
2 answers

using Flask and Tornado together?

I am a big fan of Flask - in part because it is simple and in part because has a lot of extensions. However, Flask is meant to be used in a WSGI environment, and WSGI is not a non-blocking, so (I believe) it doesn't scale as well as Tornado for…
Abdelouahab
  • 7,331
  • 11
  • 52
  • 82
53
votes
5 answers

Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configurationAction 'configtest' failed

I got the below error while I was configuring CKAN DataPusher. Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configurationAction 'configtest' failed. How can I fix this?
Techie
  • 44,706
  • 42
  • 157
  • 243
48
votes
3 answers

Make sure only one worker launches the apscheduler event in a pyramid web app running multiple workers

We have a web app made with pyramid and served through gunicorn+nginx. It works with 8 worker threads/processes We needed to jobs, we have chosen apscheduler. here is how we launch it from apscheduler.events import EVENT_JOB_EXECUTED,…
Ranjith Ramachandra
  • 10,399
  • 14
  • 59
  • 96
46
votes
2 answers

SSL on Apache2 with WSGI

I am trying to set up SSL on a Django site I maintain and having a bit of trouble setting up my VirtualHost with SSL. I followed the instructions here but every time I try to restart apache, it tells me it cannot restart because of multiple…
Shane Reustle
  • 8,633
  • 8
  • 40
  • 51
46
votes
4 answers

Your server socket listen backlog is limited to 100 connections

I run a flask app on uwsgi. I use supervisor to manage uwsgi process. I find the log saying that your server socket listen backlog is limited to 100 connections. How to overcome 100 connections limitation? My running script is as…
shoujs
  • 1,113
  • 1
  • 11
  • 24
45
votes
4 answers

Multiple mod_wsgi apps on one virtual host directing to wrong app

I'm trying to get two (or more) Django applications set up at subdirectories under the same domain, e.g.: http://example.com/site1/ http://example.com/site2/ I know that normally this works fine by setting up an apache virtualhost like…
Gabriel Hurley
  • 39,690
  • 13
  • 62
  • 88
42
votes
9 answers

How do you deploy your WSGI application? (and why it is the best way)

I am deploying a WSGI application. There are many ways to skin this cat. I am currently using apache2 with mod-wsgi, but I can see some potential problems with this. So how can it be done? Apache Mod-wsgi (the other mod-wsgi's seem to not be worth…
Ali Afshar
  • 40,967
  • 12
  • 95
  • 109
41
votes
5 answers

Accessing POST Data from WSGI

I can't seem to figure out how to access POST data using WSGI. I tried the example on the wsgi.org website and it didn't work. I'm using Python 3.0 right now. Please don't recommend a WSGI framework as that is not what I'm looking for. I would like…
Evan Fosmark
  • 98,895
  • 36
  • 105
  • 117
41
votes
2 answers

Is there a speed difference between WSGI and FCGI?

From the web I've gleaned that WSGI is a CGI for python web development/frameworks. FCGI seems to be a more generalised gateway for a variety of languages. Don't know the performance difference between the two in reference to the languages python…
torger
  • 2,308
  • 4
  • 28
  • 35
41
votes
4 answers

Flask debug=True does not work when going through uWSGI

I call app.run(debug=True) in my flask file. and I have it deployed with uWSGI and nginx (I followed these instructions) uwsgi -s /tmp/uwsgi.sock -w flask_file_name:app -H /path/to/virtual/env --chmod-socket 666 But when I get an error, I don't get…
Flaviu
  • 6,240
  • 4
  • 35
  • 33
40
votes
1 answer

How does Django handle multiple requests?

How does Django handles multiple requests in production environment? Suppose we have one of web server: Apache, Nginx, gunicorn etc. So do those servers for any request from web browser start new process to serve that request? If it's true, doesn't…
Alex-droid AD
  • 635
  • 1
  • 6
  • 14
40
votes
4 answers

104, 'Connection reset by peer' socket error, or When does closing a socket result in a RST rather than FIN?

We're developing a Python web service and a client web site in parallel. When we make an HTTP request from the client to the service, one call consistently raises a socket.error in socket.py, in read: (104, 'Connection reset by peer') When I listen…
jwhitlock
  • 4,572
  • 4
  • 39
  • 49