Bug #39662 ERROR 1005 (HY000) at line ..: Can't create table '...' (errno: 881)
Submitted: 26 Sep 2008 9:55 Modified: 26 Sep 2008 11:50
Reporter: Shueb Khan Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.0.41 OS:Linux (Red Hat Enterprise Linux ES release 4 (Nahant Update 5))
Assigned to: CPU Architecture:Any
Tags: ERROR 1005 (HY000) at line ..: Can't create table '...' (errno: 881)

[26 Sep 2008 9:55] Shueb Khan
Description:
When we try to create tables and add data to them using a script, it gives error as below. Could you please help us resolve this. I am also attaching the log files with this :

ERROR 1005 (HY000) at line 2094: Can't create table './lmdcfrprd01/cho_promo.frm' (errno: 881)

The values in config.ini are as below:

[NDBD DEFAULT]
NoOfReplicas=2    # Number of replicas
#DataMemory=80M    # How much memory to allocate for data storage
DataMemory=2000M    # How much memory to allocate for data storage
#IndexMemory=18M   # How much memory to allocate for index storage
IndexMemory=400M   # How much memory to allocate for index storage

How to repeat:
Everytime we run the script, this problem comes
[26 Sep 2008 10:14] Shueb Khan
Log files-2

Attachment: ndb_error_report-2_20080926.tar.gz (application/x-gzip-compressed, text), 475.91 KiB.

[26 Sep 2008 10:18] Shueb Khan
Log files-1

Attachment: ndb_error_report-1_20080926.tar.gz (application/x-gzip-compressed, text), 333.74 KiB.

[26 Sep 2008 10:24] Shueb Khan
Log files-3

Attachment: ndb_error_report-3_20080926.tar.gz (application/x-gzip-compressed, text), 320.87 KiB.

[26 Sep 2008 10:25] Shueb Khan
Log files-4

Attachment: ndb_error_report-4_20080926.tar.gz (application/x-gzip-compressed, text), 213.24 KiB.

[26 Sep 2008 10:40] Bernd Ocklin
Hi Shueb Khan,

this is not a bug. You are simply running out of memory. From your log files:

2008-09-26 11:07:01 [MgmSrvr] INFO     -- Node 3: Data usage increased to 100%(64000 32K pages of total 64000)

881 error means out of memory as you can see using perror --ndb 881 command. You can use the ndb_size script ./ndb/tools/ndb_size.pl to figure out how to dimension your system.

I think you should upgrade to mysql-5.1 cluster version (e.g. ndb 6.3). Its has a more advanced memory management system, disk tables and varsize records for memory tables saving you a lot of memory.

Its also always good to revise your schema to better fit cluster.
[26 Sep 2008 10:41] Hartmut Holzgraefe
$ perror --ndb 881

NDB error code 881: Unable to create table, out of data pages (increase DataMemory) : Permanent error: Schema error
[26 Sep 2008 11:50] Shueb Khan
Thanks Bernhard and Hartmut 

Could you please advice me more about ndb_size.pl. I tried to run it, but got the error below. 

$ perl ndb_size.pl --database=ALL --hostname=localhost -uroot -pgeneric > /tmp/ndb_rep.html                         

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at (eval 1) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: ExampleP, Proxy.
 at ndb_size.pl line 55