When you use Django with mod_wsgi, what exactly happens when a user makes a request to the server from a browser? Does apache load up your Django app when it starts and have it running in a separate process? Does it create a new Python process for every HTTP request?
...
I am running a website on CentOS 5.3. I understand centos will break if the default python 2.4 is upgraded. I followed this site (http://www.question-defense.com/2009/12/25/how-to-install-python-2-6-on-centos-5-without-breaking-yum) and got python 2.6 installed.
Now if I run "python" it runs python2.4 and if I run "python26" it runs pyt...
when i run development server it works very well, even an empty project runing in mod_wsgi i have no problem but when i want to put my own project i get an Internal Server Error (500)
in my apache conf i put
WSGIScriptAlias /codevents C:/django/apache/CODEvents.wsgi
<Directory "C:/django/apache">
Order allow,deny
Allow from all
</Dir...
Hi, I'm writing a bare bones Python wsgi application and am getting stumped by module import errors. I have a .py file in the current directory which initially failed to import. By adding
sys.path.insert(0, '/Users/guhar/Sites/acom')
the import of the module worked. But I now try and import a module that I had installed via easy_instal...
Is it possible to have Apache htaccess rewrites take effect before it hits django?
I want to be able to specify RewriteRules in an htaccess file that take precedence over django, and if nothing matches then it gets dispatched to mod_wsgi/django.
We're using apache2 with mod_wsgi and the apache vhost looks like this:
<VirtualHost *:80>...
How to send file from C# to apache with mod_wsgi (django) and python? It will be nice to see code example in both c# (client) and python (server).
...
Hi
A client of ours is asking us to implement a module in C in Apache webserver for performance reasons. This module should handle RESTful uri's, access a database and return results in json format. Many people here have recommended python mod_wsgi instead - but for simplicity of programming reasons. Can anyone tell me if there is a ...
Good morning everyone,
Introduction
I Got a question about localeURL usage.
Everything works great for me with url like this :
http://www.mysite.com/
If I type http://www.mysite.com/ in adress bar, it turns correctly in http://www.mysite.com/en/ for example.
If I use the view change_locale, it's also all right (ie change www.mysite...
I have a variable in init of a module which get loaded from the database and takes about 15 seconds.
For django development server everything is working fine but looks like with apache2 and mod_wsgi the module is loaded with every request (taking 15 seconds).
Any idea about this behavior?
Update: I have enabled daemon mode in mod ws...
My mod_wsgi django application seems to keep getting reloaded for the first several requests that the client makes. This is killing my performance
After enough requests it seems to settle down, and the application no longer seems to be getting reloaded. Any thoughts on why this is happening and how I can prevent it?
(I have the followi...
I'm trying to setup web2py on my Fedora server, and the instructions, written for Debian, are telling me to install it in the /users/www-data directory. I realize that Fedora uses a default 'apache' user for running Apache, and Debian uses a 'www-data' user, but there's no corresponding /users/apache directory on my machine...
Here are...
I receive this error when I try to run Apache 2.2 with mod_wsgi, I have the correct Python version number and the module is installed correctly for Apache.
httpd.exe: Syntax error on line 128 of C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/Program Files (x86)/Apache Software Foundation/Apac...
[updated below]
I have a bit of a problem deploying a site on apache with mod_wsgi with some javascript bookmarklet functionality; alpha site is up and usable here: stemhub.org. The problem is that the bookmarklet (which is a browser menu button) submits to a page like
http://stemhub.org/submit/http://the-users-link.com/here
which th...
I have a form class that looks something like this:
class RegisterForm(Form):
username = Field(model_field='username', filters=validators.minlength(3))
You'll notice that username is a class variable. I believe this means that Field will be constructed once the first time the RegisterForm is used (after apache is restarted). It wi...
In debian recently change de default version of python from 2.5 to 2.6 but i need 2.5, how i can configure apache and/or wsgi script to say it use pythons2.5 and not python default?
...
I'm using the python signals library to kill a function if it runs longer than a set period of time.
It works well in my tests but when hosted on the server I get the following error
"signal only works in main thread"
I have set the WSGI signals restriction to be off in my httpd.conf
WSGIRestrictSignal Off
as described
http://code....
Hi,
First of all my site is up and running OK. There is no critical issues.
I want to understand a couple of things though.
I'll start with an overview of my system.
It's a django-powered site located on a CentOS 5.3 VPS with 256MB RAM, under apache with mod_wsgi.
The django application runs as a Daemon process with 1 threads.
What...
I'm running a site by apache2.x with mod_wsgi 2.5, and python2.5. It is configured to run in multi-processes and each process only contains one thread.
When I read this post, I try to set the process name to PATH_INFO, but it doesn't work. My code is like:
import ctypes
libc = ctypes.CDLL('/lib/libc.so.6')
def application (environ, st...
I make mod_wsgi is like following
$./configure
--with-python=/Library/Frameworks/Python.framework/Versions/2.7/bin/python
--with-apxs=/usr/local/apache2/bin/apxs
checking Apache version... 2.0.63
configure: creating ./config.status
config.status: creating Makefile
$sudo make $sudo make install
and then I cop...
I'm trying to get Django and Apache working together using Mod_wsgi and currently I'm getting the following errors:
[Thu Jul 15 12:52:38 2010] [error] [client 10.100.50.73] mod_wsgi (pid=4803): Target WSGI script '/home/webdev/websites/virtualenvs/polaris/polaris_project.py' cannot be loaded as Python module.
[Thu Jul 15 12:52:38 2010] ...