Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
UB-1760 : Added Tuning for max_connection (#284)
Browse files Browse the repository at this point in the history
Changing postgresql max_connection to 1000 from current default 100.
  • Loading branch information
deeghuge authored and olgashtivelman committed Dec 13, 2018
1 parent f455cba commit 123decb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/ubiquity-postgresql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ FROM postgres:9.6
ENV UBIQUITY_DB_CERT_PRIVATE="/var/lib/postgresql/ssl/private/ubiquity-db.key" \
UBIQUITY_DB_CERT_PUBLIC="/var/lib/postgresql/ssl/private/ubiquity-db.crt" \
UBIQUITY_DB_PROVIDED_CERT_PRIVATE="/var/lib/postgresql/ssl/provided/ubiquity-db.key" \
UBIQUITY_DB_PROVIDED_CERT_PUBLIC="/var/lib/postgresql/ssl/provided/ubiquity-db.crt"
UBIQUITY_DB_PROVIDED_CERT_PUBLIC="/var/lib/postgresql/ssl/provided/ubiquity-db.crt"\
UBIQUITY_DB_MAX_CONNECTION="1000"

RUN PGSSL_PRIVATE="`dirname $UBIQUITY_DB_CERT_PRIVATE`" && mkdir -p "$PGSSL_PRIVATE" && chown -R postgres:postgres "$PGSSL_PRIVATE" && chmod 777 "$PGSSL_PRIVATE"
RUN PGSSL_PUBLIC="`dirname $UBIQUITY_DB_CERT_PUBLIC`" && mkdir -p "$PGSSL_PUBLIC" && chown -R postgres:postgres "$PGSSL_PUBLIC" && chmod 777 "$PGSSL_PUBLIC"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

if [ ! -z "$UBIQUITY_DB_MAX_CONNECTION" ]
then
echo "Updating max_connection to $UBIQUITY_DB_MAX_CONNECTION"
sed -i "s/max_connections = 100/max_connections = ${UBIQUITY_DB_MAX_CONNECTION}/g" /var/lib/postgresql/data/postgresql.conf
fi

0 comments on commit 123decb

Please sign in to comment.