pgpool and postgresql lots of idle connection
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
add a comment |
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
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
add a comment |
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
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
postgresql pgpool
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 14 '18 at 13:59
jgj1018jgj1018
425
425
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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