Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
more useful options
 
PerlMonks  

Re: mod_perl, long running process and broken connections

by TVSET (Chaplain)
on Dec 15, 2003 at 17:57 UTC ( [id://314922]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to mod_perl, long running process and broken connections

Another possible solution (apart from using fork as recommended by other monks) could be cache. You can pre-generate an an image once per some period of time and then show it instantly to other clients. It is even possible to use a script to make the request for image generation (something along the lines of WWW::Mechanize.

  • Comment on Re: mod_perl, long running process and broken connections

Replies are listed 'Best First'.
Re: Re: mod_perl, long running process and broken connections
by edoc (Chaplain) on Dec 15, 2003 at 19:19 UTC

    If you are creating the same images repeatedly then this is definitely the way to go. If you put your image creation routine behind a 404 error handler and name your images so that you can parse out the details required to create the image, then you simply reference the image in your web page. If the image already exists it is served up, otherwise it is created, saved, and returned as normal. Also this way, the worst the user gets is a broken image if the request (for the image) times out.

    cheers,

    J

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://314922]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.