serializing access to a resource in my mod_perl PerlHandler

J

John Kelly

a mod_perl script i wrote quite some time ago has recently had
increased "traffic". this has shown up a problem (i think) with
serialization
of resource in the "back-end" system that my mod_perl routine provides
a wrapper for.
In the short-term, while i'm investigating the problem i'd like
quickly to modify something so all requests through the PerlHandler
which processes the content are serialized.
So, is there a configuration directive which can do this without
modification to the script itself ? If not, how can i implement some
form of serialization within the handler ?

thanks in advance
John
 
G

gnari

John Kelly said:
a mod_perl script i wrote quite some time ago has recently had
increased "traffic". this has shown up a problem (i think) with
serialization
of resource in the "back-end" system that my mod_perl routine provides
a wrapper for.
In the short-term, while i'm investigating the problem i'd like
quickly to modify something so all requests through the PerlHandler
which processes the content are serialized.
So, is there a configuration directive which can do this without
modification to the script itself ?

the only directives I can think of that does that is the Apache
max number of connections directive and the max requests per client
directive (can't be bothered to look them up). set them to 1
this, of course will dramatically reduce performance of the web server
overall, but might allow you to tst if the problems disappear.

if that works, and you *really* want to avoid changing your script,
you might run another instance of Apache with these settings and
redirect requests to your script to that instance, say with mod_rewrite.

on the other hand, it should be relatively easy to implement some sort
of locking to serialize the requests, either with lockfiles or with
the Apache notes. to minimize modification of script, create a module
to do it, or maybe a nother wrapper layer.

gnari
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top