Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Looking for a way to use one database connection with multiple CGI scripts

by pklausner (Scribe)
on Nov 23, 2009 at 22:57 UTC ( [id://808952]=note: print w/replies, xml ) Need Help??


in reply to Looking for a way to use one database connection with multiple CGI scripts

An alternative to mod_perl et al is SpeedyCGI. You still fork one process per CGI request, but the actual script gets stuffed into a background daemon for a given time or number of invocations. The connection set-up would go into the global variables space of the script == backend. The first caller would initialize it, subsequent calls re-use until the backend terminates (and takes any memory leak with it).
  • Comment on Re: Looking for a way to use one database connection with multiple CGI scripts

Replies are listed 'Best First'.
Re^2: Looking for a way to use one database connection with multiple CGI scripts
by vendion (Scribe) on Nov 24, 2009 at 22:03 UTC

    Sorry to everyone for the confusing post. I have two files on my server which each makes their own connection to my MySQL server. I have never done something to this scale before and so I don't know what would be the best approach to handling database connections like this. As for what I am using I think my server is using mod_perl because I don't have FastCGI installed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://808952]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-19 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found