Create Strategy to alert from email deadlocks in database

0

Hi.

we have the Mysql database with Saas in AWS and I need to know how I do an alert that after a 1minute alarm to me from email with the deadlock?

質問済み 3年前217ビュー
1回答
0
承認された回答

marcoborges wrote:
Hi.

we have the Mysql database with Saas in AWS and I need to know how I do an alert that after a 1minute alarm to me from email with the deadlock?

Currently there is no support for for lock alerts.
For deadlocks the engine should detect them and cancel one of the transactions.
For lock waits , something like the following can be run.

SELECT trx_id,
trx_state,
trx_wait_started,
trx_requested_lock_id,
time_to_sec(timediff(now(),trx_started)) AS time_in_state,
lock_type,
lock_table,
lock_index,
lock_data
FROM information_schema.innodb_trx
LEFT JOIN information_schema.innodb_locks
ON trx_requested_lock_id=lock_id;

Kyle

回答済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ