I recently created a ajax based instant messaging application and after running for a while I got an error [table] is marked as crashed and should be repaired. How could this have happened and how do I go about preventing it happening again?