RE: cannot obtain connection

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Tue Apr 05 2005 - 14:44:46 EDT

  • Next message: Kevin Menard: "Re: postgresql - the sequel"

    Hi Tomislav,

    The maximum connections is the maximum that will get allocated (if you
    hit 256, I think you have other issues). The minimum connections is the
    number that will get created up-front. I would use 1 for minimum since
    others get created on-demand (when all current connections are busy, up
    to the maximum, then it waits). I wouldn't use a large number for max.
    In PostgreSQL (and probably others) it chews up shared memory/etc that
    could better be used for other things -- plus there is a maximum number
    of connections the database server will accept, regardless of
    application. I'm currently using 2 as the max in my app, but it's low
    volume. Perhaps others could suggest more practical values for a higher
    volume production application (you don't need as many connections in
    development), but it probably depends on your application's access
    patterns more than anything.

    /dev/mrg

    -----Original Message-----
    From: tnaki..ofthome.net [mailto:tnakic@softhome.net]
    Sent: Tuesday, April 05, 2005 1:57 PM
    To: cayenne-use..bjectstyle.org
    Subject: Re: cannot obtain connection

    Andrus Adamchik wrote:

    >Hi Tomislav,
    >
    >Looks like your application load requires more than one connection in
    the
    >pool ... or maybe you just have long running queries, so timeouts can
    >occur even on light loads.
    >
    >Just change the maximum number of connections for the DataNode to a
    higher
    >value in this dialog:
    >
    >http://objectstyle.org/cayenne/images/modelerguide/datanode.jpg
    >
    Thanks, Andrus. Still, do you think a much bigger default might be in
    order?
    What would happen if I set max=256? Would I have 256 connection objects
    or would they be created on demand, when all other connection objects in

    a connection pool are in use? Questions, questions, questions, I know.
    :)

    Regards,
    Tomislav



    This archive was generated by hypermail 2.0.0 : Tue Apr 05 2005 - 14:44:51 EDT