Quantcast
Channel: MySQL Forums - NDB clusters
Viewing all 1553 articles
Browse latest View live

Another one Table is full, while DataMemory is still only 10% full (4 replies)

$
0
0
Hi,

Can anybody help us with the following problem.

We use mysql cluster only to have our tables in memory.

We have a table which contains about 60M rows (about 2 GB for data, 1.5 GB for indexes when using MyISAM).

Our MySQL Cluster is configured with 15GB DataMemory and 5GB IndexMemory (hardware itself has 32GB of ram with Red Hat linux running mysql cluster only). It is pretty enough to keep in memory this table, I think.

But while inserting the table data row by row we get 1114 error 'table ... is full' after inserting 40-45M of records. Both DataMemory & IndexMemory are less than 50% full after 40-45M of records there..

What can be wrong? Can anybody help us with this trouble?

Here is cluster config file:


[ndbd default]
NoOfReplicas=1
DataMemory=15G
IndexMemory=5G
NoOfFragmentLogFiles=480
MaxNoOfConcurrentOperations=1000000
TimeBetweenLocalCheckpoints=5
RedoBuffer=32M

[mysqld default]
[ndb_mgmd default]
[tcp default]

[ndb_mgmd]
HostName= localhost

[ndbd]
HostName= 127.0.0.1
DataDir= /var/lib/mysql-cluster

[mysqld]

mysql cluster on WAn (2 replies)

$
0
0
is mysql clustering is possible on WAN? i m implementing mysql clustering on Wan
1)1 Mgmt node
2)2 Data node
3)2 sql node

My sql node is not getting connected but data node got connected?

Tables became read only when data node went down (1 reply)

$
0
0
Looks like one data node went down, while the other was up and caused the API to open tables read only?

100908 15:19:32 [ERROR] Got error 4028 when reading table './schema/table'
100908 15:19:32 [ERROR] Got error 4028 when reading table './schema/table'
100908 15:19:33 [ERROR] Got error 4028 when reading table './schema/table'
100908 15:19:34 [ERROR] /usr/local/mysql/mysql-cluster/7.1/bin/mysqld: Sort aborted
100908 15:19:34 [ERROR] Got error 4010 when reading table './schema/table1'
100908 15:20:21 [Note] NDB Binlog: Node: 21, down, Subscriber bitmask 00
100908 15:42:17 [ERROR] /usr/local/mysql/mysql-cluster/7.1/bin/mysqld: Lock wait timeout exceeded; try restarting transaction
100908 15:42:17 [ERROR] /usr/local/mysql/mysql-cluster/7.1/bin/mysqld: Sort aborted
100908 15:46:27 [ERROR] Got error 4028 when reading table './schema/table2'
100908 15:46:27 [ERROR] Got error 157 when reading table './schema/table1'
100908 15:46:27 [ERROR] /usr/local/mysql/mysql-cluster/7.1/bin/mysqld: Sort aborted
100908 15:46:29 [ERROR] Got error 157 when reading table './schema/table1'
100908 15:46:29 [Note] NDB Binlog: Node: 22, down, Subscriber bitmask 00
100908 15:46:29 [Note] NDB Binlog: cluster failure for ./mysql/ndb_schema at epoch 133292/0.
100908 15:46:29 [Note] NDB Binlog: ndb tables initially read only on reconnect.
100908 15:46:50 [Note] table './schema/table2' opened read only
100908 15:46:52 [Note] table './schema/table1' opened read only

Setup a ndb cluster in an existing environment (no replies)

$
0
0
Hi all,

As said in the subject, I need to setup a ndb cluster while keeping the existing database. I found many tutorials to create a ndb cluster in a new environment so i think i have the basics but my goal is to migrate
from 2 servers with a simple replication,
to a 3 servers ndb-based cluster :
- 1 main Mgt server + main load balancer
- 1 SQL+Data Node + spare load balancer
- 1 SQL+Data node + spare mgt server

Of course, i need failover and loadbalancing features. So first of all, is this configuration correct or did i miss something ?
Then, i need to keep the datas and avoid service interruption. As i said, i read a few tutorials, but all of them are about setting up a cluster from scratch.
So i was wondering if someone already did that or if you could help me on the steps to follow.

Thanks,

Olivier

Experiments with mysql cluster (1 reply)

$
0
0
Hello everyone,

These days I just begin research on parallel database, I guess mysql cluster is a good start. I have installed mysql cluster. But I wondered how can I do experiments with it? I want to prove that it runs faster than no cluster version.
Such as how to partition data?

In fact, I am not even familiar with mysql. So can anyone give some tips? I guess it is easy, but I am really a rookie.

My email: fujun.liu@uky.edu

Option to prevent LOST_EVENTS from being generated on SQL node restart (2 replies)

$
0
0
Bug 47096 fixed the problem of LOST_EVENTS not being generated on an restart of an SQL node operating as the master. Now that it's being generated properly, is there a way to optionally prevent the LOST_EVENTS from being generated on a restart? We have controlled situations where we need to reboot a machine that is operating as the master when we know there will be no database changes to the cluster during that time. Failing over the slaves to the secondary channel or reissuing the change master command is unnecessary overhead when we just need to restart the master. I was hoping there would be a command line option that could be specified during this controlled restart that would prevent the LOST_EVENTS from being generated. During normal operations any master restart would be done without this option so the LOST_EVENTS is generated.

What if RAM is full (no replies)

$
0
0
Hi,

I am new for mysql cluster.
I am having an application in which data will grows up to 2 TB. I want to use mysql cluster with 4 data nodes and 2 replica, but having some doubt:

1. Does mysql cluster store complete database in RAM ? In that case how I could store 2TB in RAM ?
2. If I am using disk-based mysql cluster and only indexed data will store on RAM, and if out of 2TB, 100GB are indexed data then how much RAM I required in all our data nodes?
3. Is it possible to store data on disc arrays in mysql cluster ?

Cluster deployment architecture (2 replies)

$
0
0
Hi All,
i'm starting to use MySQL Cluster for a customer and I have a "simply" question.
In few words, I have 4 different hosts with the same characteristics (cpu, memory, disks) and i'm trying to figure out the best architecture.
For instance, in the cluster manager demo I saw:

box 1 and box 2
================
mysqld
ndb_mgmd

box 3
======
ndbd 1
ndbd 2

box 4
======
ndbd 3
ndbd 4


but for what I undestood nbdb (ndbmtd) is multi-threads and having more than one data node on the same multi-cores host is not optimal.
I like having all hosts running the same processes:

box 1, box 2, box 3, box 4
==========================
mysqld
ndb_mgmd
ndbmtd

Suggestions ? I know that the question is a bit over-simplified but I need some hints to start to thing about.

Thanks in advance
ste

auto_increment with primary key not working right (2 replies)

$
0
0
Greetings forum ,

I have a mysql cluster with 2 data nodes (seperate boxes) in nodegroup0. I create a table within a database with the following structure :

CREATE TABLE `some-products` (
`connectorID` mediumint(4) unsigned NOT NULL auto_increment,
`name` varchar(20) NOT NULL,
`icon` varchar(20) NOT NULL,
`class` varchar(50) NOT NULL,
`auhorized` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`connectorID`),
KEY `auhorized` (`auhorized`)
) ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8;

Then i add data to this table with the following method

INSERT INTO `some-products` (`connectorID`, `name`, `icon`, `class`, `auhorized`) VALUES
(1, 'Bread', 'bread.png', 'breadprod', 1),
(2, 'Butter', 'butter.png', 'butterprod', 1),
(3, 'Honey', 'honey.png', 'honeyprod', 1),
(4, 'Chocolate', 'chocolate.png', 'chocoprod', 1),
(5, 'Cookie', 'cookie.png', 'cookieprod', 0),
(6, 'Milk', 'milk.png', 'milkprod', 1),
(7, 'Peanuts', 'peanuts.png', 'peanutprod', 1),
(8, 'Olives', 'olives.png', 'oliveprod', 1),
(9, 'Beans', 'beans.png', 'beanprod', 1),
(10, 'Potatoes', 'potatoes.png', 'potatoeprod', 0),
(11, 'Eggs', 'eggs.png', 'eggprod', 0);


Now when i do a "select * from `some-products`;" , i dont get tha data in the right order based on the primary key but I get the right order in a non clustered version of mysql. If i add "order by connectorID" to my select i get the data right. Any ideas why this happens? Does the partitioning of ndb storage engine has something to do with it? Anyone knows how to fix it?

Thank you

Alexander Economou

SysBench: MySQL Cluster vs Memory Engine (1 reply)

MySQL Cluster and MySQL Enterprise Server (2 replies)

$
0
0
Hi All,
can anyone explain me the relationship between MySQL Cluster and MySQL Enterprise Server ?
I downloaded the trial of MySQL Enterprise server but there is not MySQL Cluster.
Does it mean that basically mysql enterprise provides me "just" the enterprise version of mysqld ? (well, and all the monitoring tools).

There is not an enterprise version of MySQL Cluster ?

Thanks
ste

Free space in tablespace files (1 reply)

$
0
0
Hi. Anyone can tell me how to see how many space is in tablespace files?

MySQL nodes not starting. Caused by error 2301. (3 replies)

$
0
0
Hello,

I am trying to setup a 2 node Cluster with 1 Cluster Manager. I am running MySQL 5.1.50. When I run the ndbd on either of my Node, I get this error on Cluster Manager server:

"Node 2: Forced node shutdown completed. Occured during startphase 4. Caused by error 2301: 'Assertion(Internal error, programming error or missing error message, please report a bug). Temporary error, restart node'."

Here is the ndb_2_error.log:
Message: Assertion (Internal error, programming error or missing error message, please report a bug)
Error: 2301
Error data: ArrayPool<T>::getPtr
Error object: ../../../../../storage/ndb/src/kernel/vm/ArrayPool.hpp line: 372 (block: RESTORE)
Program: ndbd
Pid: 1468
Trace: /usr/local/mysql/var/mysql-cluster/ndb_2_trace.log.25
Version: Version 5.1.50
***EOM***

I have come across some posts that mention to start the nodes before starting the MySQL process. But I can't even get the nodes to start, the only way I get the node to start is if I do "ndbd --initial". However, after that I cannot create tables, this is the error I get:

Unable to create table, getting this error: ERROR 1005 (HY000): Can't create table 'mysqlclustertest.ctest' (errno: 157)

I would appreciate any feedback I can get on these issues.
Thanks.

mysql cluster with disk data storage (4 replies)

$
0
0
Hi,
We recently installed mysql cluster using disk data storage.

We create log file group and 3 tablespaces each 4GB space like this:

mysql> CREATE LOGFILE GROUP LG_TRANSFER_FREE
-> ADD UNDOFILE 'undo_tr_free_1.dat'
-> INITIAL_SIZE 128M
-> UNDO_BUFFER_SIZE 10M
-> ENGINE NDB;
Query OK, 0 rows affected (5.33 sec)

mysql> ALTER LOGFILE GROUP LG_TRANSFER_FREE
-> ADD UNDOFILE 'undo_tr_free_2.dat'
-> INITIAL_SIZE 128M
-> ENGINE NDB;
Query OK, 0 rows affected (5.00 sec)

mysql> CREATE TABLESPACE ts_transfer_free
-> ADD DATAFILE 'data_tr_free_1.dat'
-> USE LOGFILE GROUP LG_TRANSFER_FREE
-> INITIAL_SIZE 4000M
-> ENGINE NDB;
Query OK, 0 rows affected (2 min 13.95 sec)

mysql> ALTER TABLESPACE ts_transfer_free
-> ADD DATAFILE 'data_tr_free_2.dat'
-> INITIAL_SIZE 4000M
-> ENGINE NDB;
Query OK, 0 rows affected (1 min 56.70 sec)

mysql> ALTER TABLESPACE ts_transfer_free ADD DATAFILE 'data_tr_free_3.dat' INITIAL_SIZE 4000M ENGINE NDB;
Query OK, 0 rows affected (1 min 54.19 sec)

In config.ini of ndb_mgmd server we put :

InitialLogFileGroup=name=LG_TRANSFER_FREE; undo_buffer_size=10M; undo_tr_free_1.dat:128M; undo_tr_free_2.dat:128M
InitialTablespace=name=ts_transfer_free; extent_size=8M; data_tr_free_1.dat:4000M; data_tr_free_2.dat:4000M; AUTOEXTEND_SIZE:100M

But our problem is that when we check memory status in ndb_mgm it shows us:
ndb_mgm> all report memory;
Node 2: Data usage is 99%(2541 32K pages of total 2560)
Node 2: Index usage is 5%(759 8K pages of total 12832)
Node 3: Data usage is 99%(2558 32K pages of total 2560)
Node 3: Index usage is 5%(740 8K pages of total 12832)


Why mysql cluster doesn`t use disk data storage?

Thanks.

MySQL Cluster low performance issues (5 replies)

$
0
0
We're testing the performance of our following MySQL Cluster setup with apache benchmark:

1 management node (12gb ram, i7 quadcore 2.88ghz each core, 2x 1500gb hdd)
4 mysql nodes (12gb ram, i7 quadcore 2.88ghz each core, 2x 1500gb hdd)
6 data nodes (24gb ram, i7 quadcore 2.88ghz each core, 3x 1500gb hdd)

From the config side we tested with different settings like max connection pool, max threads and max connections. The bandwidth of each server is 1 gbit/s. We tested our cluster with a php script doing simple inserts with concurrent inserts=2 and could now just archieve the best value of about 15000 concurrent inserts. I'm very curious about finding the bottleneck, but neither the cpu usage (under 10%), nor the memory (about 5gb on data nodes), disk IO and network usage was high. So, does anyone have any ideas about where the bottlenecks could be? When we tested the same thing with a mysql replication master slave setup (with MyISAM on it) we could archieve already 10000 concurrent inserts on just 1 db server! Also the bottleneck should not be on the php side as we tried to ab with several web servers with nginx setup and the mysql cluster always had a extremly increased latency.

Cluster vs Replication vs Both - Advice needed (1 reply)

$
0
0
Hi All,

Please excuse my newbee status. We have a web application currently running on a standard LAMP setup. The application is basically a questionnaire. I need to place additional servers in geographically remote locations to eliminate a regional outage as a possible single point of failure.

I understand that MySQL Cluster is not intended for use over the Internet and it's recommended to replicate the clustered servers. If I have to use replication, then what is the advantage of MySQL Cluster over a standard MySQL implementation? I understand the Cluster gives me additional redundancy locally, but what I'm trying to achieve is geographic redundancy. Should I use Cluster for this or stick with the regular MySQL and replicate?

I would appreciate any suggestions on how I might research this and loose my newbee status.

TIA

Could not alloc node id (2 replies)

$
0
0
I`m trying to use ndb_desc but it gaves me this error:

[root@s214 bin]# ndb_desc -c localhost transfer_ro_s3 -d sent -p
Configuration error: Error : Could not alloc node id at localhost port 1186: No free node id found for mysqld(API).
Unable to connect to management server.

NDBT_ProgramExit: 1 - Failed

[root@s214 bin]#


I also have 2 mysql api slot empty for conectivity:
ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @86.x.x.4 (mysql-5.1.47 ndb-7.1.5, Nodegroup: 0)
id=3 @193.x.x.212 (mysql-5.1.47 ndb-7.1.5, Nodegroup: 0, Master)

[ndb_mgmd(MGM)] 1 node(s)
id=1 @193.x.x.214 (mysql-5.1.47 ndb-7.1.5)

[mysqld(API)] 4 node(s)
id=4 @86.x.x.4 (mysql-5.1.47 ndb-7.1.5)
id=5 @193.x.x.212 (mysql-5.1.47 ndb-7.1.5)
id=6 (not connected, accepting connect from any host)
id=7 (not connected, accepting connect from any host)

ndb_mgm>

Anyone have any ideea?

Thanks.

Many "mysql_query(): Unable to save result set in..." errors with Cluster !?!?!? (4 replies)

$
0
0
I'm trying to stress-test an Apache/PHP -> Cluster setup and for some reason I'm getting many "mysql_query(): Unable to save result set in" errors with many (i.e, usually > 250) concurrent Apache clients.

The strange thing is that happens _sometimes_ but not always, so it's not always reproducible.

I've looked in the logs on the SQL and NDB nodes, and see nothing unusual. (Yes, I enabled general logging and everything else.) The only thing I see is the damn error in PHP :-@

Here is my setup:

Everything is on Ubuntu 10.04.1 (Lucid) on ~8 GB machines.

Cluster uses mysql-cluster-gpl-7.1.5-linux-x86_64-glibc23.tar.gz
2 SQL/MGM Nodes
2 NDB Nodes
Configuration based on severalnines.com/config (wonderful resource!)

1 Web server machine: Apache/PHP set up with approx 310 worker processes.

Apache/PHP on the web server is Ubuntu's (not hand-compiled). I've looked all over, and memory does not seem to be lacking anywhere. Also, PHP is configured with a high memory limit and unlimited persistent connections.

On the Web server I've set up a simple php script that does mysql_pconnect, mysql_select_db, a trivial mysql_query, mysql_fetch_array, and mysql_free_result.

The trivial query is "select * from sessions limit 1";
(There are a few million records in that table, but when it works it always returns one of two values; must be the round-robin'ing to the NDB nodes.)

The error ("mysql_query(): Unable to save result set in...") always occurs on mysql_query, obviously. No errors have ever been reported on pconnect, select_db, fetch_array.

I'm using the "regular" (i.e., non-Cluster) php/mysql client library. Not sure if this could cause the problem. (There's a bug in the Ubuntu apt-get that installs the Cluster client library, and I haven't taken the time to figure that out yet.)

On the web server itself, I run "ab" (pointing it to localhost) on the script.
The script connects to the same SQL node every time.

Related to this, I'm wondering why the SQL node drops ("quits") the persistent connections from the web server after a few seconds of inactivity, even though I'm specifying "MYSQL_CLIENT_INTERACTIVE" in the pconnect.

Any ideas will be greatly appreciated... Thanks in advance. -T.

p.s. I'm cross-posting to the "PHP" forum, too. Sorry for the duplication.

Schedule Backup (1 reply)

$
0
0
Hi,
How can i schedule backup for MySql Cluster ?

Thanks.

MySQL Cluster Backup on only one server (1 reply)

$
0
0
Hi,

How can we make the backup of the cluster to be only on one server not in every node so when we do ndb_restore, restore to be executed from only one server not on every node to execute ndb_restore?

Is this possible?

Thanks.
Viewing all 1553 articles
Browse latest View live




Latest Images