"wsrep in pre-commit stage" sometimes slows down my queries

119 views
Skip to first unread message

Arkadiy Arkadiy

unread,
Apr 27, 2016, 3:03:30 AM4/27/16
to codership
This isn't a general problem. Happens only few times per day.
However, I haven't found any documentation regarding the "wsrep in pre-commit stage" status for queries and what could be causing it to take longer than normal.

Sometimes, my UPDATE/INSERT queries take around 3-20 seconds to complete. 
I setup profiling to see what is actually happening and here is what it showed:

UPDATE users SET user_lastlogin=NOW() WHERE user_id='103396'
StatusDuration
starting0.000020
checking permissions0.000003
Opening tables0.000010
init0.000032
System lock0.000037
updating0.000189
end0.000003
Waiting for query cache lock0.000002
end0.000051
query end0.000007
wsrep in pre-commit stage10.479955
ha_commit_one_phase(287176997)0.000004
innobase_commit_low():trx_comm0.000016
ha_commit_one_phase(287176997)0.000052
wsrep in pre-commit stage0.000017
closing tables0.000011
freeing items0.000034
logging slow query0.000002
logging slow query0.000002
cleaning up0.000002

I would love to know what actually the "pre-commit" stage does and how it is tuned/monitored.
I have attached my "show status" and "show variables" in case someone can take a deeper look.

Once again, this isn't a general problem and happens only a few times per day.

Thank you!
mysql_status.txt
mysql_variables.txt
Reply all
Reply to author
Forward
0 new messages