Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
mysql-freeze
Search
ichirin2501
March 10, 2018
Programming
0
340
mysql-freeze
ichirin2501
March 10, 2018
Tweet
Share
More Decks by ichirin2501
See All by ichirin2501
MySQL運用とらぶるすとーり〜^2 / MySQL-Troubleshooting-Story
ichirin2501
7
12k
計算量と僕とWeb開発 / computational complexity and I and Web
ichirin2501
14
10k
Other Decks in Programming
See All in Programming
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
290
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
480
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
140
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
150
Haze - Real time background blurring
chrisbanes
1
510
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
720
どうして手を動かすよりもチーム内のコードレビューを優先するべきなのか
okashoi
3
150
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
110
テストコード書いてみませんか?
onopon
2
130
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
790
情報漏洩させないための設計
kubotak
3
310
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
160
Featured
See All Featured
Facilitating Awesome Meetings
lara
50
6.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
A better future with KSS
kneath
238
17k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Building Your Own Lightsaber
phodgson
103
6.1k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Docker and Python
trallard
42
3.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Transcript
MySQL freeze ͷר גࣜձࣾͯͳ id: ichirin2501 2017-08-19 Kyoto.ͳΜ͔ #3
ࣗݾհ • ݩߊ ( @ichirin2501 ) • ͯͳͷWebΦϖϨʔγϣϯΤϯδχΞ ڵຯ
ࠓճͷ͓
MySQLͷfreeze!!
࣌ʹ֬ೝग़དྷͨൣғΛྻڍ • ٸʹࢮ͵ • ࢮʹํfreeze, MySQLͷϓϩηεੜ͖ͯΔ • mysqladmin pingͳͲͷԠग़དྷΔ •
Ұ෦σʔλϕʔεͷΫΤϦ͕ฦͬͯ͜ͳ͍ • TCPͷଓཱ֬ग़དྷΔ, TCP keepaliveಈ͍ͯΔ • ΤϥʔϩάʹԿใग़ྗ͞Ε͍ͯͳ͍
͏͚Δ
͏͚ͳ͍
MySQLͷόʔδϣϯͱ͔ • MySQL-5.5.46 • mysql-server-5.5_5.5.46-0+deb7u1_amd64.deb • mysql-server-5.5_5.5.46-0+deb8u1_amd64.deb • OS: Debian
7.10(wheezy) or 8.1(jessie) • Kernel: wheezy=3.10.23, jessie=3.16.0
ڧҾʹ࠶ݱͤ͞Δ
sysbench !! (ҙ:benchmarkπʔϧ)
ߴෛՙΛ͔͚ଓ͚ͨΒ࠶ݱ͠ ͨʂʂ
sysbenchʹΑΔࡶͳݕূ݁Ռ EFCJBO EFCJBO P P Y Y
Y P P P P P x͕freeze
ϚΠφʔόʔδϣϯΛ্͛Δ 5.5.46 -> 5.5.52
ຊ൪ͰFreeze͠ͳ͘ͳͬͨ
ԿΘ͔ΒΜ͕ฏ͕๚Εͨ
࣌ա͗...
։ൃऀɿʮscript࣮ߦͯͨ͠Βfreezeͨ͠ʯ ࢲɿʮ͋ʔ͋ʔɺͳʹฉ͑͜·ͤΜʯ
MySQL-5.6.27͕Freeze
࠶ݕূ1 • աڈͷ؆қͳݕূͰfreeze͠ͳ͔ͬͨ • ಉݕূΛ࠶ߦ͕ͬͨ࠶ݱग़དྷͳ͍ • : sysbenchετϨεςετͰͳ͍
࠶ݕূ2 • ࣮ࡍʹϑϦʔζͨ͠batchεΫϦϓτͰࢼ͢ • 1ճ25࣌ؒͷbatchεΫϦϓτ • ݕূճ͕ॏͶΒΕͳ͍͕ࢼͦ͏ʂ
1ճͰݟࣄʹfreeze ͬͨͶʂʂʂʂʂ
ௐࠪ • Ҏલௐࠪͨ͠ͱ͖ʹεϧʔ͍߲͕ͯͨ͠ؾ ʹͳͬͨ • mysql-5.5.49ͷBugs FixedͷҰ෦ • InnoDB: Running
REPLACE operations on multiple connections resulted in a hang. (Bug #22530768, Bug #79185)
bug report • ʮInnodb freeze running REPLACE statementsʯhttps://bugs.mysql.com/ bug.php?id=79185 •
ಈ࡞ڥͱݱ͕ࠅࣅ͍ͯͨ͠ɻ ͰɺREPLACEΫΤϦࠓճͷfreezeࣄ݅ʹ ͓͍ͯҰൃߦ͞Ε͍ͯͳ͍
ؾʹͳͬͯίʔυΛݟʹߦ͘ • https://github.com/mysql/mysql-server/ search?q=22530768&type=Commits&utf8= %E2%9C%93 • |'o') TASपΓͷमਖ਼͡ΌΜ....REPLACEΫΤϦ ʹݶΒͳ͍ͷͰ....ෆԺ
ϚΠφʔόʔδϣϯΛ্͛Δ • 5.6.27ʹઌ΄ͲͷBugfixؚ·Ε͍ͯͳ ͍ɻͱΓ͋͑ͣ5.6.37·Ͱ্͛ͯscriptΛ࣮ߦ • ಉ༷ͷscriptΛԿ͔࣮ߦ͕ͨ͠freezeͳ͠ ࠓฏʂʂʂ
Α͘Θ͔ΒΜ͕ղܾʂʂ
ฏ͕Ұ൪
·ͱΊ • ϛυϧΣΞͷݕূेʹߦ͍·͠ΐ͏ • ͪΌΜͱετϨεςετΛ࣮ࢪ͠·͠ΐ͏ • ؾʹͳͬͨBugमਖ਼ͷίϛοτΛݟʹߦ͜͏