Take the 2-minute tour ×

I have created a scalable java application on openshift using Tomcat 7 as server. The application connects to a MySQL database installed on a separate gear. The whole database is ~500MB in size. The database has a single table which accounts for almost 80% of database size and has a FULLTEXT column.

When I restore the database, I disabled the keys for the table using command:

alter table lbpage disable keys;

Once the data is loaded, I issue the following command to enable the keys:

alter table lbpage enable keys;

After about 15-20 mins, I get the following error:

mysql> alter table lbpage enable keys;
Query OK, 0 rows affected, 2 warnings (14 min 10.26 sec)

mysql> show warnings;
| Level | Code | Message                                           |
| Error |    3 | Error writing file '/tmp/STfYgR6M' (Errcode: 122) |
| Error | 1034 | 122 when fixing table                             |
2 rows in set (0.00 sec)

I tried OPTIMIZE TABLE and REPAIR TABLE for that table, but the database server just hangs. After a while I start getting this error:

ERROR 144 (HY000): Table './lib/lbpage' is marked as crashed and last (automatic
?) repair failed

I have tried using a small gear as well as medium gear - but the result is same.

I am not sure if the database is hitting any limits set by openshift? Also, is there any way we can fine tune the mysqld daemon?

share|improve this question

1 Answer 1

Check your disk usage on the gear as a first step. Then look to see if Mysql logs show any other errors and post those leading up to this error.

By default, your gears have access to 1GB of storage each. On a scalable app, your diskspace is 1GB solely for your data on the db gear. How much free diskspace do you have on your DB gear? The "alter table" command makes a copy of that and uses 400GB (80% of your total database as per notes above). If it's storage, you can increase it to 2GB to see if that resolves the issue.

If that isn't the root cause, please add any mysql logs leading up to the error, as well as the mysql db server vs client versions.

share|improve this answer

Your Answer


