(Hopefully I&#39;m not out of my depth here)<div><br><div>I feel your pain WRT Oracle connections as we&#39;ve had similar complaints from our DBA overlords about the number of connections our app was making here at $work.  Do you have your mod_perl processes behind some sort of proxy?  If you run your mod_perl application in the same apache instance that serves static content any child that is spawned, even if it&#39;s just for serving HTML or an image file, will be fully functional (including having a database connection for each catalyst app that is hosted on that server).  You might consider changing how your application is deployed and use FastCGI (or mod_perl behind a proxy) so that it&#39;s easier to control the number of processes (and therefore database connections) you spin up.</div>
<div><br><div class="gmail_quote">On Wed, Sep 8, 2010 at 10:46 AM, Stuart Watt <span dir="ltr">&lt;<a href="mailto:swatt@infobal.com">swatt@infobal.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


  
    
  
  <div bgcolor="#ffffff" text="#000000">
    Sounds like a job for DBD::Proxy or DBD::Gofer, not that I&#39;ve ever
    used them, and I have no idea whether they would play nice with DBIC
    -- the DBIC folks would have a better grasp on that question. That
    would leave the Catalyst parts unchanged apart from configuration,
    which would be a good thing architecturally. <br>
    <br>
    --S<br>
    <br>
    <div><span style="color:rgb(102, 0, 0)">Stuart
        Watt<br>
        ARM Product Developer<br>
        Information Balance</span></div><div><div></div><div class="h5">
    <br>
    On 9/8/2010 10:54 AM, Simon Miner wrote:
    </div></div><blockquote type="cite"><div><div></div><div class="h5">Thanks for the responses,<br>
      <br>
      Jason, I don&#39;t think reducing the number of database connections
      will hurt responsiveness.  Even though there are 3 separate
      Catalyst apps, each HTTP request will only involve one of them
      (since they all run out of the same web server), so there should
      never be contention between the apps for the shared database
      connection.  Does this make sense?<br>
      <br>
      Tom and Nicholas, I wish this was premature optimization, but my
      organization has experienced serious performance issues in the
      past related to multiple (Oracle) database connections per HTTP
      server process.  Extra Oracle connections are expensive to
      maintain, particularly on the database server, and so we&#39;ve tried
      to ensure that a single server process only has a single
      connection to a given database (since that&#39;s all it should need at
      any given time).<br>
      <br>
      I&#39;ve attached a Devel::NYTProf screenshot for one of the server
      processes I profiled this morning. Looks like it confirms the
      multiple database connections.<br>
      <br>
      So back to initial question -- How do I update the models of my
      three Catalyst apps to share a single Oracle database connection?<br>
      <br>
      Thanks again.  I really appreciate your feedback.<br>
      <br>
       Simon<br>
      <br>
      <div class="gmail_quote">On Tue, Sep 7, 2010 at 11:40 PM, Nicholas
        Wehr <span dir="ltr">&lt;<a href="mailto:catalyst@bionikchickens.com" target="_blank">catalyst@bionikchickens.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">I&#39;m with Tom on this one. Unless you&#39;ve
          narrowed all optimization efforts and this is all you have
          left - it could be worth a try.. but as Jason points out, you
          may not gain a thing. I&#39;d recommend profiling your code and
          tracking down performance issues from that base level. Please
          post your results - I&#39;ve very curious!<br>
          <font color="#888888">
            <br>
            -nw</font>
          <div>
            <div><br>
              <br>
              <div class="gmail_quote">On Tue, Sep 7, 2010 at 7:21 PM,
                Tomas Doran <span dir="ltr">&lt;<a href="mailto:bobtfish@bobtfish.net" target="_blank">bobtfish@bobtfish.net</a>&gt;</span>
                wrote:<br>
                <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                  <div><br>
                    On 7 Sep 2010, at 18:59, Simon Miner wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                      All three of these apps run under a single Apache
                      1.3.42/mod_perl 1.31 server.<br>
                    </blockquote>
                    <br>
                  </div>
                  Wow, mod_perl 1.... Ok then :)
                  <div><br>
                    <br>
                    <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                       It appears that each server process creates a
                      unique database connection variable for each of
                      these apps. Although these database connections
                      get reused from request to request, I would like
                      to make things even more efficient by having a
                      single database connection variable per server
                      process which gets shared across all 3 Catalyst
                      apps.<br>
                    </blockquote>
                    <br>
                  </div>
                  Why do you think that this will help or affect
                  anything?<br>
                  <br>
                  I.e. is this not premature optimisation?<br>
                  <br>
                  Cheers<br>
                  t0m
                  <div>
                    <div><br>
                      <br>
                      <br>
                      _______________________________________________<br>
                      List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>
                      Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
                      Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
                      Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
                    </div>
                  </div>
                </blockquote>
              </div>
              <br>
            </div>
          </div>
          <br>
          _______________________________________________<br>
          List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>
          Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
          Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
          Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <br clear="all">
      <br>
      -- <br>
      -- Simon<br>
      <br></div></div>
      --
      <br>
      This message was scanned by ESVA and is believed to be clean.
      <br>
      <a href="http://antispam.infobal.com/cgi-bin/learn-msg.cgi?id=7897728072.B3B1D" target="_blank">Click
        here to report this message as spam.</a><div class="im">
      <pre><fieldset></fieldset>
_______________________________________________
List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a>
</pre>
    </div></blockquote>
  </div>

<br>_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br></blockquote></div><br></div></div>