David,
Yes, the easiest way to find out what mode Spyce is running under is to
run the info.spy file. At the very end, under the version section, there
is some mode info. If I run it from the command line, I see: cmd. Under
mod_python, it should say: modpy. Some of the other options are: cgi
(regular CGI), fcgi (FastCGI), and www (internal webserver).
This information is also included in the HTTP headers that are sent back.
Spyce automatically adds the 'X-Spyce' header with this information. The
current format is:
X-Spyce: Spyce/<spyce-mode>_<spyce-version> Python/<python-version>
Your httpd.conf below seems to have two handlers for the .spy extension:
AddHandler spyce-cgi-handler spy
AddHandler python-program .spy
It's likely that the first line is triggered first, and CGI is used to
respond to your request. Try commenting this out, and hopefully you will
see a dramatic improvement in performance.
All the best,
Rimon.
On Thu, 24 Apr 2003, David Casti wrote:
>On 4/23/03 10:19 PM, "Rimon Barr" <barr@...> wrote:
>
>> If you are running via mod_python, then the situation should be much
>> improved. You do not need to start a new process, nor load the python
>> interpretter, nor start the Spyce engine from scratch. All you need is to
>> run the (likely already compiled) spyce script. This should take only a
>> few milliseconds! The disk-based cache will be slower than the
>> memory-based cache.
>
>Hm. I agree that mod_python should be faster, and a few milliseconds is
>definitely where I would like to end up in this process!
>
>So, that suggests to me that I have misconfigured spyce in the httpd.conf
>file. Currently my httpd.conf looks like this --
>
>AddHandler spyce-cgi-handler spy
>Action spyce-cgi-handler "/spyce-cgi/run_spyceCGI.py"
>ScriptAlias /spyce-cgi/ "/server/spyce/"
><IfModule mod_python.c>
> AddHandler python-program .spy
> PythonHandler run_spyceModpy::spyceMain
> PythonOption SPYCE_CONFIG "/server/spyce/spyce.conf"
># # !!! Do NOT turn on. !!!
> PythonOptimize Off
></IfModule>
>#<Location /spyce-cgi/>
># <IfModule mod_fastcgi.c>
> # If mod_fastcgi not installed, we get plain cgi
># SetHandler fastcgi-script
># </IfModule>
>#</Location>
># If FastCGI is installed, it will be picked up
># automatically. On Linux, you can also omit this section
># and use a dynamic fcgi server instead.
>#<IfModule mod_fastcgi.c>
># FastCgiServer "/server/spyce/cgi/run_spyceCGI.py" -port 7654 -initial-env
>FCGI_PORT=7654
>#</IfModule>
>
>-- but maybe that is not sufficient to activate mod_python properly.
>
>Is there a way to test that mod_python is installed properly and that spyce
>is loaded, etc?
|