MySQL Cluster 7.1.3 でこんなエラーが発生 🙁
#1114 - The table '○○○' is full
色々調べたところ DataMemory 使用率が 96% に達している事が判明しました。
$ ndb_mgm -- NDB Cluster -- Management Client -- ndb_mgm> all report memoryusage Connected to Management Server at: localhost:1186 Node 11: Data usage is 96%(12800 32K pages of total 12288) Node 11: Index usage is 60%(6826 8K pages of total 4096) Node 12: Data usage is 96%(12800 32K pages of total 12288) Node 12: Index usage is 60%(6826 8K pages of total 4096) (※実際の数値とは違います) |
DataMemory は config.ini で指定しますので、config.ini を変更して
DataMemory, IndexMemory を増やしました。
root# vi /var/lib/mysql-cluster/config.ini |
[NDBD DEFAULT] NoOfReplicas=2 DataDir=/var/lib/mysql-cluster # ServerPort = 63132 # MaxNoOfConcurrentOperations=10000 DataMemory=1024M IndexMemory=128M # TimeBetweenWatchDogCheck=30000 # MaxNoOfOrderedIndexes=512 |
この変更を反映させます。
- ndb_mgmd を再起動をします。
- データノードを順番に再起動
- メモリ使用率を確認
この時、起動オプションに –reload を追加します。
(この –reload が分かるまで何度も試行錯誤してしまいました 🙂 )
root# kill {ndb_mgmd の PID} root# kill {ndb_mgmd の PID}(もういっちょ!) -bash: kill: ({ndb_mgmd の PID}) - No such process(停止したね!!) root# /usr/sbin/ndb_mgmd --config-dir=/var/lib/mysql-cluster --config-file=/var/lib/mysql-cluster/config.ini --reload |
(Node 11 を再起動します。) ndb_mgm> 11 restart(しばらく待ちます) Node 11: Node shutdown initiated Node 11: Node shutdown completed, restarting, no start. Node 11 is being restarted Node 11: Start initiated (version 7.1.3) ndb_mgm> Node 11: Started (version 7.1.3)(再起動完了) (Node 12 を再起動します。) ndb_mgm> 12 restart(しばらく待ちます) Node 12: Node shutdown initiated Node 12: Node shutdown completed, restarting, no start. Node 12 is being restarted Node 12: Start initiated (version 7.1.3) ndb_mgm> Node 12: Started (version 7.1.3)(再起動完了) |
ndb_mgm> ALL REPORT MemoryUsage Connected to Management Server at: localhost:1186 Node 11: Data usage is 35%(11636 32K pages of total 32768) Node 11: Index usage is 10%(1652 8K pages of total 16416) Node 12: Data usage is 35%(11636 32K pages of total 32768) Node 12: Index usage is 10%(1651 8K pages of total 16416) |
DataMemory, IndexMemory が増えて使用率が減りました 🙂
今後も使用量は増え続けるのでこの作業は繰り返し行う必要がありそうです