wsgi

Cant compile uwsgi under centos (fc10) with python2.6

it`s normally build with python 2.5 BUT i need 2.6! 2.6 normally installed in /opt/python26 and successfully run as python2.6 in console. but python2.6 uwsgiconfig.py --build give me *** uWSGI linking *** /usr/bin/ld: cannot find -lpython2.6 collect2: ld returned 1 exit status HELP! ...

Django repeating vars/cache issue?

I'm trying to build a better/more powerful form class for Django. It's working well, except for these sub-forms. Actually, it works perfectly right after I re-start apache, but after I refresh the page a few times, my HTML output starts to look like this: <input class="text" type="text" id="pickup_addr-pickup_addr-pickup_addr-id-pickup_...

Mod_wsgi versus fapws3 - Django

Hi folks, is there a difference between using FAPWS3 and MOD_WSGI when dealing with Django? FAPWS3 seems alot faster when serving requests toward Python scripts. I would like to know if I'm missing out anything. :) Any ideas? ...

Best Way to Run Functional Tests of a WSGI Application?

I'm writing a pair of simple WSGI applications to get a feel for the standard, and I'm to the point where I'd like to test that my applications are working as expected. Now I'm trying to figure out the best way start and stop a server hosting those applications. My first thought was to start up the SimpleServer from wsgiref in the setUp...

Django on Dreamhost - testing/sand box environment

I've been using webfaction for all my django needs for the last couple of years but have had a high traffic site fall in my lap that dreamhost are probably better suited to handling. To set up and experiment with a site with webfaction there are your [user].webfactional.com accounts. Which is sweet. Equivalently Dreamhost also offers [...

Any WSGI middleware to make HTTP redirect on specific status code?

I'm using Pylons and want to add some middleware to it so that it catches 401 status codes and makes HTTP Redirect (302) to Signin page. I know there is built-in StatusCodeRedirect in Pylons that acts in a similar fashion, but it does not produce HTTP redirect, and rather redirects internally (this is what I do not want). Is there any ...

CherryPy and concurrency

Hi folks, I'm using CherryPy in order to serve a python application through WSGI. I tried benchmarking it, but it seems as if CherryPy can only handle exactly 10 req/sec. No matter what I do. Built a simple app with a 3 second pause, in order to accurately determine what is going on... and I can confirm that the 10 req/sec has nothing...

Best (or appropriate) WSGI server for this Python script? - Python

Hi folks, I'm having quite a problem deciding how to serve a few Python scripts. The problem is that the basic functionality could be generalized by this: do_something() time.sleep(3) do_something() I tried various WSGI servers, but they have all been giving me concurrency limitations, as in I have to specify how many threads to u...

Urllib and concurrency - Python

Hi there, I'm serving a python script through WSGI. The script accesses a web resource through urllib, computes the resource and then returns a value. Problem is that urllib doesn't seem to handle many concurrent requests to a precise URL. As soon as the requests go up to 30 concurrent request, the requests slow to a crawl! :( Help...

Tilecache standalone server with nginx in production environment

Hi, I am really new to tilecache. I would like to know how good is the tilecache http server that comes with the tilecache installation. Is it practical to deploy it behind nginx in production environment? (i.e. nohup tilecache_http_server.py -p 8000 & and then editting the nginx.conf). The VPS we are using has nginx installed already so...

Apache + Mod_wsgi returning 502 Bad Gateway!

Hi folks, I'm serving Django with mod_wsgi and Apache... unfortunately requests are returning 502 Bad Gateway error messages... Received a invalid response HttpResponse('OK') is affected by this render_to_response('...') is not! any ideas?!? ...

Could somebody give me a high-level technical overview of WSGI details behind the scenes vs other web interface approaces with Python?

Firstly: I understand what WSGI is and how to use it I understand what "other" methods (Apache mod-python, fcgi, et al) are, and how to use them I understand their practical differences What I don't understand is how each of the various "other" methods work compared to something like UWSGI, behind the scenes. Does your server (Nginx,...

Why is Django/FastCGI/Apache logging HTTP status code 200 for every request, even 404s?

Edit: I have now discovered that the status code is returned correctly, it just isn't recorded correctly in Apache's access.log. Title amended. This is still a problem. Any ideas? Original question follows. Hi all. I run the following stack: Django(svn) on WSGI on FastCGI on Apache on Dreamhost. Every page served by Django returns HTTP...

Django + Apache wsgi = paths problem

Hello. I have this view which generates interface language options menu def lang_menu(request,language): lang_choices = [] import os.path for lang in settings.LANGUAGES: if os.path.isfile("gui/%s.py" % lang) or os.path.isfile("gui/%s.pyc" % lang): langimport = "from gui.%s import menu" % lang ...

How can I tell Phusion Passenger which python to use?

I'm using Phusion Passenger with a ruby app and I'd also like to set it up to work with an django appengine app I'm working on. Googling for "passenger_wsgi.py" I was able to get the following very simple non-django app working on passenger: passenger_wsgi.py: def application(environ, start_response): response_headers = [('Content-...

Stack recommendations for small/medium-sized web application in Python

I'm looking for some recommendations for a python web application. We have some memory restrictions and we try to keep it small and lean. We thought about using WSGI (and a python webserver) and build the rest ourself. We already have a template engine we'd like to use, but we are open for some suggestions regarding the whole request ha...

SSL and WSGI apps - Python

Hi folks, I have a WSGI app that I would like to place behind SSL. My WSGI server is gevent. What would a good way to serve the app through SSL in this case be? ...

stumped by WSGI module import errors

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...

How do i use repoze.who?

I'm having some trouble understanding how repoze.who works. I've followed a tutorial i found by searching on google and here's what i already have: This is what i added in my middleware.py file from repoze.who.config import make_middleware_with_config as make_who_with_config app = make_who_with_config(app, global_conf, app_conf['who....

what is the recommended way of running a embedded web server within a desktop app (say wsgi server with pyqt)

The desktop app should start the web server on launch and should shut it down on close. Assuming that the desktop is the only client allowed to connect to the web server, what is the best way to write this? Both the web server and the desktop run in a blocking loop of their own. So, should I be using threads or multiprocessing? ...