I use the CodeIgniter framework for one of my web applications.
I have no problems in my dev environment running the app and, for the most part, my app works fine in production.
However, my users and I get a few sporadic errors regarding the database.
- Incorrect key file for table ‘/mysql-tmp/#sql_78b5_0.MYI’;
- Got error 28 from storage engine
- Got error -1 from storage engine
The database error message looks something like this:
ERROR -2013-01-15 13:56:35 –> DB Error Message:
Error Number:
126Incorrect key file for table ‘/mysql-tmp/#sql_78b5_0.MYI’;
try to repair itSELECT
bw.bw_id
,bw.wod_date
,CASE WHEN ifnull(bw.simple_title,”) = ” THEN ‘No name given’ ELSE simple_title END AS simple_title
,COUNT(mw.bw_id) AS recorded_wod
FROM
box_wod bw
LEFT JOIN member_wod mw ON
bw.bw_id = mw.bw_id AND
mw.member_id = 15
WHERE
box_id = 3
GROUP BY
bw.bw_id, bw.wod_date, simple_title, mw.bw_id
ORDER BY
bw.wod_date DESCFilename: /hermes/…/box_model.php
Line
Number: 400
My search for answers all lead to one path: available diskspace.
I have tried to point this out to my Hosting provider, but they claim this is not the problem:
I have checked your reported issue. There is no MySQL server issues. I
have checked the provided error log and it seems that issue with the
your database table. Currently, your website is working fine without
any issues. Please check the database tables from your end.“Incorrect key file for table ‘/mysql-tmp/#sql_78b5_0.MYI’;” If you
have any further questions, please update the Support Console.
I have run repair on all my tables; my database is around a megabyte. I still get this issue.
Is there any other setup issue (either with CI or my database) that could cause this problem?
Does the CI framework create temporary tables that could be corrupted?
I do write my on SQL statements, but they all work before I send them out.
I’m just trying to understand what (besides diskspace) could cause this problem.
The answer, in short, is that you get what you pay for.
There was something happening on the server with my hosting provider. After going back and forth many times with support, they wiped their hands clean of the issue. In addition, they do not give users access to the server where your code is stored; so there was nothing I could troubleshoot beyond my code which worked fine on my development machine.
Thus, I chose to move to a new hosting provider and the problem went away.