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
330
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
CSC509 Lecture 02
javiergs
PRO
0
160
Progressive Web Apps for Rails developers
siaw23
2
550
.NET Aspireのクラウド対応検証: Azureと他環境での実践
ymd65536
1
430
Cloud Adoption Framework にみる組織とクラウド導入戦略
tomokusaba
2
460
Real-time message handling and notifications with API Platform and Symfony
alli83
1
110
ROS 2のZenoh対応とZenohのROS 2対応
takasehideki
2
300
sqlcを利用してsqlに型付けを
kamiyam
0
240
メルカリ ハロ アプリの技術スタック
atsumo
2
790
Unlocking Python's Core Magic
leew
0
130
Kotlin Multiplatform at Stable and Beyond (Kotlin Vienna, October 2024)
zsmb
2
350
実務未経験からいち早く戦力化するための新人エンジニア育成術 ~ 具体的な方法と育成する側の心得 ~
juri_matsuda
0
110
Re:PandasAI:生成AIがデータ分析業務にもたらすパラダイムシフト【増補改訂版】
negi111111
1
910
Featured
See All Featured
The Invisible Side of Design
smashingmag
297
50k
Building a Scalable Design System with Sketch
lauravandoore
459
32k
Documentation Writing (for coders)
carmenintech
65
4.4k
Testing 201, or: Great Expectations
jmmastey
38
7k
Designing for humans not robots
tammielis
249
25k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
110
6.9k
4 Signs Your Business is Dying
shpigford
180
21k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Infographics Made Easy
chrislema
239
18k
Pencils Down: Stop Designing & Start Developing
hursman
119
11k
Fireside Chat
paigeccino
32
3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
46
4.9k
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मਖ਼ͷίϛοτΛݟʹߦ͜͏