Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CSAN
Csan
Commits
2a6fe801
Commit
2a6fe801
authored
Jul 14, 2020
by
He Weiwei
Browse files
chore(db): change max_connections of postgres to 1024
Signed-off-by:
He Weiwei
<
hweiwei@vmware.com
>
parent
9483559d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
make/harbor.yml.tmpl
make/harbor.yml.tmpl
+2
-2
make/photon/db/docker-entrypoint.sh
make/photon/db/docker-entrypoint.sh
+11
-1
No files found.
make/harbor.yml.tmpl
View file @
2a6fe801
...
...
@@ -40,8 +40,8 @@ database:
# The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained.
max_idle_conns: 50
# The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections.
# Note: the default number of connections is 10
0
for postgres.
max_open_conns: 100
# Note: the default number of connections is 10
24
for postgres
of harbor
.
max_open_conns: 100
0
# The default data volume
data_volume: /data
...
...
make/photon/db/docker-entrypoint.sh
View file @
2a6fe801
...
...
@@ -107,4 +107,14 @@ EOSQL
echo
fi
postgres
-D
$PGDATA
POSTGRES_PARAMETER
=
''
file_env
'POSTGRES_MAX_CONNECTIONS'
'1024'
# The max value of 'max_connections' is 262143
if
[
$POSTGRES_MAX_CONNECTIONS
-le
0
]
||
[
$POSTGRES_MAX_CONNECTIONS
-gt
262143
]
;
then
POSTGRES_MAX_CONNECTIONS
=
262143
fi
POSTGRES_PARAMETER
=
"
${
POSTGRES_PARAMETER
}
-c max_connections=
${
POSTGRES_MAX_CONNECTIONS
}
"
postgres
-D
$PGDATA
$POSTGRES_PARAMETER
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment