Skip to content

Commit cf46c66

Browse files
committed
set max connection
1 parent 4f656a4 commit cf46c66

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/smoke-test.yml

+18
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@ jobs:
3737
- name: Install psql
3838
run: sudo apt install postgresql-client
3939

40+
- name: Set Max Connection Limit
41+
run: |
42+
export PGHOST=localhost
43+
export PGUSER=postgres
44+
export PGPASSWORD=test1234
45+
psql -h localhost -U postgres -c "ALTER SYSTEM SET max_connections = '100';"
46+
47+
- name: Verify Max Connection Limit
48+
run: |
49+
export PGHOST=localhost
50+
export PGUSER=postgres
51+
export PGPASSWORD=test1234
52+
MAX_CONNECTIONS=$(PGPASSWORD=test1234 psql -h localhost -U postgres -d postgres -c "SHOW max_connections;" | grep -oP '(?<=row )[0-9]+')
53+
if [ "$MAX_CONNECTIONS" -ne "10" ]; then
54+
echo "Max connections is not set correctly!"
55+
exit 1
56+
fi
57+
4058
- name: Run the smoke test
4159
run: |
4260
set -eu

docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ services:
1111
environment:
1212
POSTGRES_USER: timescaledb
1313
POSTGRES_PASSWORD: postgrespassword
14-
14+
POSTGRES_MAX_CONNECTIONS: 10
15+
1516
graphql-engine:
1617
image: hasura/graphql-engine:latest
1718
ports:

0 commit comments

Comments
 (0)