Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4160767
  • 博文数量: 240
  • 博客积分: 11504
  • 博客等级: 上将
  • 技术积分: 4277
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-28 14:24
文章分类

全部博文(240)

分类: Mysql/postgreSQL

2007-12-03 16:33:45

1、今天倒入数据的时候碰到一个错误。
Error occured at:2007-12-03 14:41:01
Line no.:154
Error Code: 1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8052. You have to change some columns to TEXT or BLOBs

查了我对应的表,原来有的字段类型为:varchar(512).看来MySQL5.1的集群对VARCHAR类型还不是很好的支持。只能支持到VARCHAR(255)。

2、Cluster configuration warning line 46: Could not use next node id 5 for section [API], using next unused node id 7.

这个警告在于管理节点的配置里指定了具体的ID。
[mysqld]
id=5
[mysqld]
这个ID系统自己分配。
3、ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
Temporary error: 266: Time-out in NDB, probably caused by deadlock
或者:

mysql> show warnings;
+-------+------+---------------------------------------------------------------------------------+
| Level | Code | Message                                                                         |
+-------+------+---------------------------------------------------------------------------------+
| Error | 1297 | Got temporary error 274 'Time-out in NDB, probably caused by deadlock' from NDB |
+-------+------+---------------------------------------------------------------------------------+
1 row in set (0.00 sec)

解决方法:

在管理节点的[ndbd default]
区加:
TransactionDeadLockDetectionTimeOut=10000(我这里设置了10秒)默认是1200(1.2秒)

按照顺序重新启动各个节点就不会出现问题了。


4、创建LOGFILE GROUP 失败
mysql> create logfile group lg_2
    -> add undofile 'undo_3.dat'
    -> initial_size 400M
    -> undo_buffer_size 50M
    -> engine ndb;
ERROR 1525 (HY000): Failed to create LOGFILE GROUP
mysql> show warnings;
+-------+------+---------------------------------------------------------------------------+
| Level | Code | Message                                                                   |
+-------+------+---------------------------------------------------------------------------+
| Error | 1296 | Got error 1514 'Currently there is a limit of one logfile group' from NDB |
| Error | 1525 | Failed to create LOGFILE GROUP                                            |
+-------+------+---------------------------------------------------------------------------+
2 rows in set (0.00 sec)

解决办法:
原来现在的MYSQL只支持创建一个LOGFILE GROUP文件。
只有删掉原来的才可以创建新的。

5、当把表数据存放到磁盘上时出现表满现象。
The table '#sql-51c5_1f9' is full

mysql> create index f_id on t11(id);
ERROR 1114 (HY000): The table '#sql-51c5_1f9' is full
解决办法:
增加表空间:
mysql> alter tablespace ts_1
    -> add datafile 'data_3.dat'
    -> initial_size 10M
    -> engine ndb;
Query OK, 0 rows affected (0.78 sec)

mysql> create index f_id on t11(id);
Query OK, 9900 rows affected (23.31 sec)
Records: 9900  Duplicates: 0  Warnings: 0
6、下午突然网络断了。然后查看MYSQL。
[root@localhost ~]# service mysqld status ERROR! MySQL is not running, but lock exists
不过最后自己好了。原因还没有彻底弄明白。

阅读(7735) | 评论(6) | 转发(0) |
给主人留下些什么吧!~~

zyangj2008-01-15 18:08:47

主要是你给这个200M内存可以存多大的数据,我怕过些时,表又满了....我要存的数据有近一二百万行.....可能容量在1-2G.所以我想把这个调大点.... 再次谢谢大侠....

zyangj2008-01-15 14:57:56

CREATE TABLE IF NOT EXISTS `videos` ( `vid` bigint(20) NOT NULL AUTO_INCREMENT, `dead` char(1) DEFAULT NULL, `url` varchar(255) NOT NULL, `snapUrl` varchar(200) DEFAULT NULL, `siteUrl` varchar(200) NOT NULL, `playerUrl` varchar(200) DEFAULT NULL, `channelUrl` varchar(200) NOT NULL, `caption` varchar(60) DEFAULT NULL, `keywords` varchar(60) DEFAULT NULL, `author` varchar(60) DEFAULT NULL, `size` varchar(20) DEFAULT NULL, `duration` varchar(20) DEFAULT NULL,

zyangj2008-01-15 14:37:37

我之前就没有用过创建LOGFILE GROUP的语句,在看过您的大作后才试着这样去做.结果发现不行.....我检索我目录下面没有发现UNDO以及REDO文件,这些文件都会在数据目录(data)下面吗? 另外,如果表结构中含有索引字段,是否就不能使用表空间来存储数据了?

zyangj2008-01-15 13:24:53

下面是你的节点情况,我在配置文件中设置的都是1200M的内存使用.为什么实际使用却这么少.....存了五十万条数据不同,表就满了.... Connected to Management Server at: localhost:1186 Cluster Configuration --------------------- [ndbd(NDB)] 4 node(s) id=3 (not connected, accepting connect from 192.168.8.47) id=4 @192.168.8.46 (Version: 5.1.22, Nodegroup: 0, Master) id=5 @192.168.8.45 (Version: 5.1.22, Nodegroup: 1) id=6 @192.168.8.43 (Version: 5.1.22, Nodegroup: 1) [ndb_mgmd(MGM)] 2 node(s) id=1 @192.168.8.36 (Version: 5.1.22)

zyangj2008-01-15 13:21:33

mysql> create logfile group lg_1 add undofile 'undo_1.dat' initial_size 2048M undo_buffer_size 1024M engine=ndbcluster; ERROR 1525 (HY000): Failed to create LOGFILE GROUP mysql> show warnings; +-------+------+---------------------------------------------------+ | Level | Code | Message | +-------+------+---------------------------------------------------+ | Error | 1296 | Got error 1504 'Out of logbuffer memory' from NDB | | Error | 1525 | Failed