pgpool and postgresql lots of idle connection












0















I'm using postdock (https://github.com/paunin/PostDock)



Postgres version: 10
Pgpool version: 3.7



1 pgpool
1 master
1 slave
1 backup (barman)



My application is connecting with pgpool ( I'hv 1 databases and 7 user/app) and I'hv seen from background that in PostgreSQL has lots of IDLE connection that was running query DISCARD ALL.



I increased the postgresql max connection from 100 to 1500. because sometimes idle connection goes up to 850 and for that connection is impacting our services.



Now we're killing the idle connection manually every 5 min.



Our application is closing connection properly because in our existing DB system (without pgpool) it only opened 12 DB connection.



have anyone face this similar problem?



I'm using the same configuration that is provided with postdock.










share|improve this question























  • Apparently pgPool is not closing those connections.

    – a_horse_with_no_name
    Nov 14 '18 at 6:45











  • then what is the solution? @a_horse_with_no_name

    – Tarikur Rahaman
    Nov 14 '18 at 7:17











  • Configure pgPool to close them?

    – a_horse_with_no_name
    Nov 14 '18 at 7:18











  • which parameter should I configure? @a_horse_with_no_name

    – Tarikur Rahaman
    Nov 14 '18 at 8:34
















0















I'm using postdock (https://github.com/paunin/PostDock)



Postgres version: 10
Pgpool version: 3.7



1 pgpool
1 master
1 slave
1 backup (barman)



My application is connecting with pgpool ( I'hv 1 databases and 7 user/app) and I'hv seen from background that in PostgreSQL has lots of IDLE connection that was running query DISCARD ALL.



I increased the postgresql max connection from 100 to 1500. because sometimes idle connection goes up to 850 and for that connection is impacting our services.



Now we're killing the idle connection manually every 5 min.



Our application is closing connection properly because in our existing DB system (without pgpool) it only opened 12 DB connection.



have anyone face this similar problem?



I'm using the same configuration that is provided with postdock.










share|improve this question























  • Apparently pgPool is not closing those connections.

    – a_horse_with_no_name
    Nov 14 '18 at 6:45











  • then what is the solution? @a_horse_with_no_name

    – Tarikur Rahaman
    Nov 14 '18 at 7:17











  • Configure pgPool to close them?

    – a_horse_with_no_name
    Nov 14 '18 at 7:18











  • which parameter should I configure? @a_horse_with_no_name

    – Tarikur Rahaman
    Nov 14 '18 at 8:34














0












0








0








I'm using postdock (https://github.com/paunin/PostDock)



Postgres version: 10
Pgpool version: 3.7



1 pgpool
1 master
1 slave
1 backup (barman)



My application is connecting with pgpool ( I'hv 1 databases and 7 user/app) and I'hv seen from background that in PostgreSQL has lots of IDLE connection that was running query DISCARD ALL.



I increased the postgresql max connection from 100 to 1500. because sometimes idle connection goes up to 850 and for that connection is impacting our services.



Now we're killing the idle connection manually every 5 min.



Our application is closing connection properly because in our existing DB system (without pgpool) it only opened 12 DB connection.



have anyone face this similar problem?



I'm using the same configuration that is provided with postdock.










share|improve this question














I'm using postdock (https://github.com/paunin/PostDock)



Postgres version: 10
Pgpool version: 3.7



1 pgpool
1 master
1 slave
1 backup (barman)



My application is connecting with pgpool ( I'hv 1 databases and 7 user/app) and I'hv seen from background that in PostgreSQL has lots of IDLE connection that was running query DISCARD ALL.



I increased the postgresql max connection from 100 to 1500. because sometimes idle connection goes up to 850 and for that connection is impacting our services.



Now we're killing the idle connection manually every 5 min.



Our application is closing connection properly because in our existing DB system (without pgpool) it only opened 12 DB connection.



have anyone face this similar problem?



I'm using the same configuration that is provided with postdock.







postgresql pgpool






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 14 '18 at 4:33









Tarikur RahamanTarikur Rahaman

323




323













  • Apparently pgPool is not closing those connections.

    – a_horse_with_no_name
    Nov 14 '18 at 6:45











  • then what is the solution? @a_horse_with_no_name

    – Tarikur Rahaman
    Nov 14 '18 at 7:17











  • Configure pgPool to close them?

    – a_horse_with_no_name
    Nov 14 '18 at 7:18











  • which parameter should I configure? @a_horse_with_no_name

    – Tarikur Rahaman
    Nov 14 '18 at 8:34



















  • Apparently pgPool is not closing those connections.

    – a_horse_with_no_name
    Nov 14 '18 at 6:45











  • then what is the solution? @a_horse_with_no_name

    – Tarikur Rahaman
    Nov 14 '18 at 7:17











  • Configure pgPool to close them?

    – a_horse_with_no_name
    Nov 14 '18 at 7:18











  • which parameter should I configure? @a_horse_with_no_name

    – Tarikur Rahaman
    Nov 14 '18 at 8:34

















Apparently pgPool is not closing those connections.

– a_horse_with_no_name
Nov 14 '18 at 6:45





Apparently pgPool is not closing those connections.

– a_horse_with_no_name
Nov 14 '18 at 6:45













then what is the solution? @a_horse_with_no_name

– Tarikur Rahaman
Nov 14 '18 at 7:17





then what is the solution? @a_horse_with_no_name

– Tarikur Rahaman
Nov 14 '18 at 7:17













Configure pgPool to close them?

– a_horse_with_no_name
Nov 14 '18 at 7:18





Configure pgPool to close them?

– a_horse_with_no_name
Nov 14 '18 at 7:18













which parameter should I configure? @a_horse_with_no_name

– Tarikur Rahaman
Nov 14 '18 at 8:34





which parameter should I configure? @a_horse_with_no_name

– Tarikur Rahaman
Nov 14 '18 at 8:34












1 Answer
1






active

oldest

votes


















1














I don't know much about postdock, but it seems this pgpool.conf(https://github.com/paunin/PostDock/blob/master/src/pgpool/configs/pgpool.conf) is used for settings. and you can see "connection_life_time = 0"
connection_life_time is the time in seconds to terminate the cached connections to the PostgreSQL backend and 0 means connections will not be disconnected.
you should specify certain specific number.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53293237%2fpgpool-and-postgresql-lots-of-idle-connection%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    I don't know much about postdock, but it seems this pgpool.conf(https://github.com/paunin/PostDock/blob/master/src/pgpool/configs/pgpool.conf) is used for settings. and you can see "connection_life_time = 0"
    connection_life_time is the time in seconds to terminate the cached connections to the PostgreSQL backend and 0 means connections will not be disconnected.
    you should specify certain specific number.






    share|improve this answer




























      1














      I don't know much about postdock, but it seems this pgpool.conf(https://github.com/paunin/PostDock/blob/master/src/pgpool/configs/pgpool.conf) is used for settings. and you can see "connection_life_time = 0"
      connection_life_time is the time in seconds to terminate the cached connections to the PostgreSQL backend and 0 means connections will not be disconnected.
      you should specify certain specific number.






      share|improve this answer


























        1












        1








        1







        I don't know much about postdock, but it seems this pgpool.conf(https://github.com/paunin/PostDock/blob/master/src/pgpool/configs/pgpool.conf) is used for settings. and you can see "connection_life_time = 0"
        connection_life_time is the time in seconds to terminate the cached connections to the PostgreSQL backend and 0 means connections will not be disconnected.
        you should specify certain specific number.






        share|improve this answer













        I don't know much about postdock, but it seems this pgpool.conf(https://github.com/paunin/PostDock/blob/master/src/pgpool/configs/pgpool.conf) is used for settings. and you can see "connection_life_time = 0"
        connection_life_time is the time in seconds to terminate the cached connections to the PostgreSQL backend and 0 means connections will not be disconnected.
        you should specify certain specific number.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 '18 at 13:59









        jgj1018jgj1018

        425




        425






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53293237%2fpgpool-and-postgresql-lots-of-idle-connection%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            The Sandy Post

            Danny Elfman

            Pages that link to "Head v. Amoskeag Manufacturing Co."