-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
experimental debug output for debugging performance issues
- Loading branch information
1 parent
ab29854
commit a064cad
Showing
4 changed files
with
49 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
#!/bin/bash | ||
|
||
PID="$$" | ||
LOGPATH=/tmp/log-liveness-"$PID" | ||
|
||
exec {BASH_XTRACEFD}>>$LOGPATH | ||
#set -x | ||
|
||
|
||
echo "$(date --iso-8601=ns)" | tee -a $LOGPATH | ||
source /clowder_init.sh | ||
|
||
/usr/pgsql-14/bin/pg_isready -h localhost -p ${PG_BOUNCER_LISTEN_PORT} -U "${DB_USER}" | grep "accepting connections" | ||
exit $? | ||
echo "$(date --iso-8601=ns)" | tee -a $LOGPATH | ||
/usr/pgsql-14/bin/pg_isready -h localhost -p ${PG_BOUNCER_LISTEN_PORT} -U "${DB_USER}" | grep "accepting connections" | tee -a $LOGPATH | ||
RESULT=$? | ||
echo "$(date --iso-8601=ns)" | tee -a $LOGPATH | ||
echo "result was $RESULT" | tee -a $LOGPATH | ||
exit $RESULT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
#!/bin/bash | ||
|
||
PID="$$" | ||
LOGPATH=/tmp/log-readiness-"$PID" | ||
|
||
exec {BASH_XTRACEFD}>>$LOGPATH | ||
#set -x | ||
|
||
# Note: host and port should remain localhost and ${PG_BOUNCER_LISTEN_PORT} | ||
# because that represents the location of pgbouncer itself, not the | ||
# remote psql server that would have $DB_HOST:$DB_PORT. | ||
|
||
source /clowder_init.sh | ||
|
||
echo "$(date --iso-8601=ns)" | tee -a $LOGPATH | ||
PGPASSWORD="$DB_PASSWORD" /usr/pgsql-14/bin/psql \ | ||
-h localhost -p ${PG_BOUNCER_LISTEN_PORT} -U "${DB_USER}" -d "${DB_NAME}" \ | ||
-c "select 1 as psql_is_ready" 2>/dev/null \ | ||
| grep "psql_is_ready" | ||
exit $? | ||
| grep "psql_is_ready" | tee -a $LOGPATH | ||
RESULT=$? | ||
echo "$(date --iso-8601=ns)" | tee -a $LOGPATH | ||
echo "result was $RESULT" | tee -a $LOGPATH | ||
exit $RESULT | ||
|