Skip to content
Browse files

Added a check for max_connections error for master monitor

  • Loading branch information...
1 parent abd88e1 commit 8c1b85fa3cfbe602ccaccba7d75e6188f49c7beb @y-trudeau committed Oct 16, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 heartbeat/mysql
View
10 heartbeat/mysql
@@ -864,9 +864,13 @@ mysql_monitor() {
-e "SELECT COUNT(*) FROM $OCF_RESKEY_test_table"
rc=$?
- if [ $rc -ne 0 ]; then
- ocf_log err "Failed to select from $test_table";
- return $OCF_ERR_GENERIC;
+ if [ $rc -ne "$MYSQL_TOO_MANY_CONN_ERR" ]; then
+ if [ $rc -ne 0 ]; then
+ ocf_log err "Failed to select from $test_table";
+ return $OCF_ERR_GENERIC;
+ fi
+ else
+ ocf_log info "Master hit max_connections"
fi
fi

0 comments on commit 8c1b85f

Please sign in to comment.
Something went wrong with that request. Please try again.