Need to solve the "Stateless HTTP" problem

G

Gnarlodious

My scripting has grown to the point where the Apache server is a
problem. My Python websites run and quit, which means I need to save
data and recreate everything next page load. Bulky and slow. What is
the simplest solution?

I am running Py3 on OSX Server with Apache 2. Essentially I want
certain objects to be a "constantly running process" that may timeout
after some disuse. I suspect there are already systems for it. Please
advise in simple terms, I am not a professional.

-- Gnarlie
 
G

garabik-news-2005-05

Gnarlodious said:
My scripting has grown to the point where the Apache server is a
problem. My Python websites run and quit, which means I need to save
data and recreate everything next page load. Bulky and slow. What is
the simplest solution?

Karrigell?
 
C

Chris Angelico

My scripting has grown to the point where the Apache server is a
problem. My Python websites run and quit, which means I need to save
data and recreate everything next page load. Bulky and slow. What is
the simplest solution?

I am running Py3 on OSX Server with Apache 2. Essentially I want
certain objects to be a "constantly running process" that may timeout
after some disuse. I suspect there are already systems for it. Please
advise in simple terms, I am not a professional.

Depending on how much of Apache's featureset you're using, it may be
easiest to set it aside altogether and just run a Python HTTP server.
Then you can maintain as much state as you like.

But if you're currently hosting multiple sites and distinguishing
between them using Host: headers (using NameVirtualHost), then you'd
have to change them all, which probably wouldn't be worthwhile.

Chris Angelico
 
I

Ian Kelly

My scripting has grown to the point where the Apache server is a
problem. My Python websites run and quit, which means I need to save
data and recreate everything next page load. Bulky and slow. What is
the simplest solution?

I am running Py3 on OSX Server with Apache 2. Essentially I want
certain objects to be a "constantly running process" that may timeout
after some disuse. I suspect there are already systems for it. Please
advise in simple terms, I am not a professional.

It sounds to me like you're currently running your Python scripts as
CGIs? You should look into running your scripts via mod_wsgi in
daemon mode, which will do exactly what you are asking. See here:

http://code.google.com/p/modwsgi/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top