Any help would be much appreciated!
We are evaluating mysql cluster for a large/high profile project. We set it up yesterday, and all was going well. This morning we find this though:
The table claims not to exist here:
mysql (root@localhost)> select * from items limit 10;
ERROR 1032 (HY000): Can't find record in 'items'
mysql (root@localhost)> show errors;
+-------+------+------------------------------+
| Level | Code | Message |
+-------+------+------------------------------+
| Error | 1032 | Can't find record in 'items' |
+-------+------+------------------------------+
1 row in set (0.00 sec)
But the table exists here:
mysql (root@localhost)> show tables;
+---------------+
| Tables_in_mbe |
+---------------+
| aspects |
| item_aspects |
| items |
| users |
+---------------+
4 rows in set (0.03 sec)
Table exists here:
mysql (root@localhost)> show create table items;
---------------------------------------+
| Table | Create Table |
| items | CREATE TABLE `items` (
`id` bigint(20) NOT NULL,
BLA BLA BLA
) ENGINE=ndbcluster DEFAULT CHARSET=utf8 |
---------------+
1 row in set (0.00 sec)
The table exists here:
mysql (root@localhost)> select count(*) from items;
+----------+
| count(*) |
+----------+
| 5507351 |
+----------+
1 row in set (0.00 sec)
1) how can this happen?!?!
2) how can I fix it?
ndb_mgm> show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 6 node(s)
id=2 @10.86.134.44 (mysql-5.5.28 ndb-7.2.9, Nodegroup: 0, Master)
id=3 @10.86.130.83 (mysql-5.5.28 ndb-7.2.9, Nodegroup: 0)
id=4 @10.86.140.93 (mysql-5.5.28 ndb-7.2.9, Nodegroup: 1)
id=5 @10.86.138.86 (mysql-5.5.28 ndb-7.2.9, Nodegroup: 1)
id=6 @10.86.138.91 (mysql-5.5.28 ndb-7.2.9, Nodegroup: 2)
id=7 @10.86.140.89 (mysql-5.5.28 ndb-7.2.9, Nodegroup: 2)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @10.86.138.85 (mysql-5.5.28 ndb-7.2.9)
[mysqld(API)] 1 node(s)
id=8 @10.86.138.85 (mysql-5.5.28 ndb-7.2.9)
ndb_mgm> all report memory
Node 2: Data usage is 5%(94170 32K pages of total 1638400)
Node 2: Index usage is 3%(21814 8K pages of total 655392)
Node 3: Data usage is 5%(94168 32K pages of total 1638400)
Node 3: Index usage is 3%(21814 8K pages of total 655392)
Node 4: Data usage is 5%(94235 32K pages of total 1638400)
Node 4: Index usage is 3%(21809 8K pages of total 655392)
Node 5: Data usage is 5%(94235 32K pages of total 1638400)
Node 5: Index usage is 3%(21809 8K pages of total 655392)
Node 6: Data usage is 5%(94091 32K pages of total 1638400)
Node 6: Index usage is 3%(21798 8K pages of total 655392)
Node 7: Data usage is 5%(94088 32K pages of total 1638400)
Node 7: Index usage is 3%(21800 8K pages of total 655392)
-----------------------ndb_mgm config------------------------------
[mysqld]
ndbcluster
ndb-connectstring=mc-master-1-phx
[mysql_cluster]
ndb-connectstring=mc-master-1-phx
09:53:51 aspitzer@phx7b02c-718516|mc-master-1-phx:~ > more /data/mysql-cluster/conf/mgmt.phx
[tcp default]
SendBufferMemory=2M
ReceiveBufferMemory=2M
[ndb_mgmd]
hostname=mc-master-1-phx
datadir=/data/mysql-cluster-data/mgmt
[ndbd default]
datadir=/data/mysql-cluster-data/ndb
NoOfReplicas=2
#LockPagesInMainMemory=1
DataMemory=50G
IndexMemory=5G
#ODirect=1
MaxNoOfConcurrentOperations=100000
SchedulerSpinTimer=400
SchedulerExecutionTimer=100
RealTimeScheduler=1
TimeBetweenGlobalCheckpoints=1000
TimeBetweenEpochs=200
DiskCheckpointSpeed=10M
DiskCheckpointSpeedInRestart=100M
RedoBuffer=32M
CompressedLCP=1
CompressedBackup=1
#this all came from here:
#
http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster-config-starting.html
[ndbd]
hostname=mc-1-phx
datadir=/data/mysql-cluster-data/ndb
LockExecuteThreadToCPU=1
LockMaintThreadsToCPU=0
[ndbd]
hostname=mc-2-phx
datadir=/data/mysql-cluster-data/ndb
LockExecuteThreadToCPU=1
LockMaintThreadsToCPU=0
[ndbd]
hostname=mc-3-phx
datadir=/data/mysql-cluster-data/ndb
LockExecuteThreadToCPU=1
LockMaintThreadsToCPU=0
[ndbd]
hostname=mc-4-phx
datadir=/data/mysql-cluster-data/ndb
LockExecuteThreadToCPU=1
LockMaintThreadsToCPU=0
[ndbd]
hostname=mc-5-phx
datadir=/data/mysql-cluster-data/ndb
LockExecuteThreadToCPU=1
LockMaintThreadsToCPU=0
[ndbd]
hostname=mc-6-phx
datadir=/data/mysql-cluster-data/ndb
LockExecuteThreadToCPU=1
LockMaintThreadsToCPU=0
[mysqld]
hostname=mc-master-1-phx
----------------------------------------------------
-----------------ndbd config---------------
[mysqld]
ndbcluster
ndb-connectstring=mc-master-1-phx
[mysql_cluster]
ndb-connectstring=mc-master-1-phx
---------------------------------------
------------ MYSQL config -----------------
[mysqld]
port = 3306
socket = /tmp/mysql.sock
ndbcluster
ndb-connectstring=mc-master-1-phx
max_connect_errors = 1000
max_connections = 5000
innodb_buffer_pool_size = 16G
key_buffer_size = 16G
table_open_cache = 512
sort_buffer_size = 4M
read_buffer_size = 4M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 128M
thread_cache_size = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
max_allowed_packet = 16M
default-storage-engine = ndbcluster
[mysql_cluster]
ndb-connectstring=mc-master-1-phx
---------------------------------------------