MySQL table is full

I recently found that the Barnyard process on my IDS sensors were unexpectedly throwing errors in /var/log/messages:

barnyard[3862]: FATAL ERROR: Error (The table 'data' is full) executingquery: INSERT INTO data(sid, cid, data_payload) VALUES('5', '9158','00000A2EFF534D4273000000001807C800004253525350594C2000000000FFFE000040000CFF002E0A04413200000000000000AB0900000000D4000080F309608209A706062B060

I logged into my master MySQL database server and checked the size of the sguildb data file:

# du -ha sguildb/data.MYD4.1G    sguildb/data.MYD

Oh, there must be a 4G filesize limit. Let’s see how many rows I have in data:

mysql> select count(*) from data;+----------+| count(*) |+----------+|  3719121 |+----------+1 row in set (0.00 sec)

I probably need to bump up the number of rows. This article at the MySQL site helped.

mysql> SHOW TABLE STATUS FROM sguildb LIKE 'data';

That output gave me the rows and avg_row_length I need for the following command. I decided to bump up the max_rows to double what I currently had (2*3719121):

mysql> ALTER TABLE data max_rows = 7438242 avg_row_length = 1154;Query OK, 3719121 rows affected (16 min 0.57 sec)Records: 3719121  Duplicates: 0  Warnings: 0

Problem solved.

Comments are closed.