mod-wsgi

How do you use FCKEditor's image upload and browser with mod-wsgi?

I am using FCKEditor within a Django app served by Apache/mod-wsgi. I don't want to install php just for FCKEditor andI see FCKEditor offers image uploading and image browsing through Python. I just haven't found good instructions on how to set this all up. So currently Django is running through a wsgi interface using this setup: impor...

mod_wsgi yield output buffer instead of return

Right now I've got a mod_wsgi script that's structured like this.. def application(environ, start_response): status = '200 OK' output = 'Hello World!' response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output...

If I want to use a pylons app with Apache, should I use mod_wsgi or proxy to paste?

Or should I be using a totally different server? ...

django and mod_wsgi having database connection issues

I've noticed that whenever I enable the database settings on my django project (starting to notice a trend in my questions?) it gives me an internal server error. Setting the database settings to be blank makes the error go away. Here are the apache error logs that it outputs. mod_wsgi (pid=770): Exception occurred processing WSGI scrip...

datetime.now() in Django application goes bad

Hi, I've had some problems with a Django application after I deployed it. I use a Apache + mod-wsgi on a ubuntu server. A while after I reboot the server the time goes foobar, it's wrong by around -10 hours. I made a Django view that looks like: def servertime(): return HttpResponse( datetime.now() ) and after I reboot the server an...

mod_wsgi 2.5 on Ubuntu 9.04 with Python 2.6.2 installation.

Has anybody succeeded with mod_wsgi 2.5 on Ubuntu 9.04 with default Python installation (2.6.2)? I got compilation errors: mod_wsgi.c:119:2: error: #error Sorry, mod_wsgi requires at least Python 2.3.0. mod_wsgi.c:123:2: error: #error Sorry, mod_wsgi requires that Python supporting thread. which Python gives /usr/bin/python and /usr/...

apache prefork/mod_wsgi spawned process count seemingly past configuration

in a production environment running nginx reversing back to apache mpm-prefork/mod_wsgi, im seeing 90 apache child processes, when i would expect that 40 would be the maximum, as configured below. the configuration/setup is nothing exciting: nginx is reverse proxying to apache via proxy_pass, and serving static media apache only serves...

Python Mod_WSGI Output Buffer

This is a bit of a tricky question; I'm working with mod_wsgi in python and want to make an output buffer that yields HTML on an ongoing basis (until the page is done loading). Right now I have my script set up so that the Application() function creates a separate 'Page' thread for the page code, then immediately after, it runs a con...

Passing data to mod_wsgi

In mod_wsgi I send the headers by running the function start_response(), but all the page content is passed by yield/return. Is there a way to pass the page content in a similar fashion as start_response()? Using the return.yield statement is very restrictive when it comes to working with chunked data. E.g. def Application(): b = ...

Flash-based file upload (swfupload) fails with Apache/mod-wsgi.

This question has been retitled/retagged so that others may more easily find the solution to this problem. I am in the process of trying to migrate a project from the Django development server to a Apache/mod-wsgi environment. If you had asked me yesterday I would have said the transition was going very smoothly. My site is up, acce...

Is mod_wsgi/Python optimizing things out?

Hello all, I have been trying to track down weird problems with my mod_wsgi/Python web application. I have the application handler which creates an object and calls a method: def my_method(self, file): self.sapi.write("In my method for %d time"%self.mmcount) self.mmcount += 1 # ... open file (absolute path to file), extrac...

Apache MaxClients when KeepAlive is Off

with apache, is it reasonable to reduce MaxClients when KeepAlive is Off? currently, MaxClients is set to 150, which is the default for mpm-worker. nginx serves static files and reverse-proxies to apache we are averaging around 12-15 requests per second cpu load avg is never above 0.8 on a quad-core box thanks! ...

Django, mod-wsgi, and daemon mode; problem "bash:fork:cannot allocate memory"

Hello, I would appreciate if someone can provide feedback or point me in the correct direction. I am unable to execute any terminal commands on a remote server when three django sites are running in daemon mode. I do not have a problem when I use embedded mode on one or two sites. When I enter the commands I only get "-bash:fork:cannot...

Django Apache Redirect Problem

I'm configuring my Django project to run on Apache using mod_wsgi. I am attempting to run Django below the directory 'cflow' on apache, but am running into problem with redirects. My apache conf looks something like this: ... WSGIScriptAlias /cflow "C:\Program Files\Apache Software Foundation\Apache2.2\wsgi\django.wsgi" <Directory "C:\...

Connection Reuse with Curl, Apache and mod_wsgi

I am deploying a mod_wsgi application on top of Apache, and have a client program that uses Curl. On the CURL api on the user side, I have it attempt to reuse connection, but looking at the connections from wireshark, I see that for every HTTP request/response, a new connection is made. At the end of every HTTP request, the HTTP resp...

Apache Django Mod_Wsgi - auto reload

I am trying to auto reload my django app which uses apache + mod_wsgi on my local windows machine. I'd like to know where do I add this code that's referenced in the following article: http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode def _restart(path): _queue.put(True) prefix = 'monitor (pid=%d):' % os.getpid() ...

Python/mod_wsgi server global data

Hello All ... I have been looking into different systems for creating a fast cache in a web-farm running Python/mod_wsgi. Memcache and others are options ... But I was wondering: Because I don't need to share data across machines, wanting each machine to maintain a local cache ... Does Python or WSGI provide a mechanism for Python nat...

Django persistent database connection.

Hi folks, I'm using django with apache and mod_wsgi and PostgreSQL (all on same host), and I need to handle a lot of simple dynamic page requests (hundreds per second). I faced with problem that the bottleneck is that a django don't have persistent database connection and reconnects on each requests (that takes near 5ms). While doing a...

Installing Django with mod_wsgi

I wrote an application using Django 1.0. It works fine with the django test server. But when I tried to get it into a more likely production enviroment the Apache server fails to run the app. The server I use is WAMP2.0. I've been a PHP programmer for years now and I've been using WAMPServer since long ago. I installed the mod_wsgi.so an...

Apache Django Mod_Wsgi Sessions Development Enviroment

I'd like to know how I can maintain sessions while developing on my local machine (django, apache, mod-wsgi). Each time I make updates to python code I need to restart Apache for the changes to take effect. ...