Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Answer: Persistent connections under IIS?

( #39581=categorized answer: print w/ replies, xml ) Need Help??

Q&A > database programming > Persistent connections under IIS? contributed by gregorovius

As far as I know (and I've really looked for this answer in the ActiveState documentation) IIS/Perlscript will not cache any of global data or pre-compiled scripts. Every time you invoke a page it gets compiled and executed again and there's no way to get around this other than resorting to PerlEx, which comes with it's share of obscurities (I, for instance, was unable to make it stop generating http headers in the ASP like embedded perl option, which prevented me from sending cookies, which is an important lack, and PerlEx comes with no source).

The fact that you can't cache globals under IIS/Perlscript is what prevents you from keeping connections alive. Given this I believe that AgentM's is not a real solution to the problem. runrig's suggestion, which relies on a perl wrapper around microsoft persistant objects, seems like the way to go for me.

If your DB tables are small enough, and most of your traffic is read only, I could suggest you putting your tables into hashes and freezing them into the Application object, which is a horrible hack, but can be a lot faster than querying the database. You can see a discussion on this at this node.

Comment on Answer: Persistent connections under IIS?
Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (18)
As of 2015-07-29 14:15 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (263 votes), past polls