Skip to content

Commit

Permalink
set max connection
Browse files Browse the repository at this point in the history
  • Loading branch information
AtulRajput01 committed Jun 20, 2023
1 parent 4f656a4 commit cf46c66
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ jobs:
- name: Install psql
run: sudo apt install postgresql-client

- name: Set Max Connection Limit
run: |
export PGHOST=localhost
export PGUSER=postgres
export PGPASSWORD=test1234
psql -h localhost -U postgres -c "ALTER SYSTEM SET max_connections = '100';"
- name: Verify Max Connection Limit
run: |
export PGHOST=localhost
export PGUSER=postgres
export PGPASSWORD=test1234
MAX_CONNECTIONS=$(PGPASSWORD=test1234 psql -h localhost -U postgres -d postgres -c "SHOW max_connections;" | grep -oP '(?<=row )[0-9]+')
if [ "$MAX_CONNECTIONS" -ne "10" ]; then
echo "Max connections is not set correctly!"
exit 1
fi
- name: Run the smoke test
run: |
set -eu
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ services:
environment:
POSTGRES_USER: timescaledb
POSTGRES_PASSWORD: postgrespassword

POSTGRES_MAX_CONNECTIONS: 10

graphql-engine:
image: hasura/graphql-engine:latest
ports:
Expand Down

0 comments on commit cf46c66

Please sign in to comment.