Crash and won't restart,

Database check tool blocks access. I saved the long error message.

Help! I am locked out of my email!

How does the database check tool block access?

Can you post the section of the error message that gives the error?

I have since rebooted and the problem went away. But after the crash and the database check starts it showed a red X beside the first step and locked up the system. I had to “end Task” to get around the problem and try again - to no avail.  This is the error message:

System.Data.SQLite.SQLiteException (0x80004005): disk I/O error

disk I/O error

   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)

   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()

   at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)

   at System.Data.SQLite.SQLiteDataReader.NextResult()

   at System.Data.SQLite.SQLiteDataReader…ctor(SQLiteCommand cmd, CommandBehavior behave)

   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)

   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)

   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()

   at System.Data.SQLite.SQLiteConnection.Open()

   at MailClient.Storage.Data.DataStore.GetConnectionInternal(String relativeName)

   at DbRepair.CorruptionChecker.CheckCorruption(RepairOptions repairOptions, CancellationToken token)

   at DbRepair.CheckingProcess.Check(CancellationToken token)

Data:

SQLiteCommandText: PRAGMA synchronous=Normal

databaseFile: categories.dat

Well ending the task probably did more damage than fixing anything. It is common when cancelling the database check, when there are errors, that afterwards the database is unusable.

The specific file referenced in the error (categories.dat) can be deleted and maybe the database will be readable again, minus your categories.

Or you can delete the database directory then restore from your most recent backup.

Or just ignore my comments above because you say that the problem went away.

Rebooting fixed the matter. 
Possibly related, though, is the fact that database checking takes hours that I cannot wait after an accidental shutdown (from either some error or a Windows upgrade over night). So I always cancel that checking. This last time I could not even do that.

If you regularly cancel the database check, at least make sure you have a backup once in a while. That way any settings, templates and local data etc. will be safe. If your email accounts are setup as IMAP or Exchange, then the messages are stored on the server so there is no problem with those if you lose the database, but if you are using POP3, backups are essential.

Yup, I regularly backup and am using POP3.

Why does the database checking take so long?

Basically a SQL database does not write new or changed data directly to the database; it stores it in a temporary file, and later it makes the changes. If you want a more correct/technical explanation, you can search the web for SQL write ahead logs. Fascinating stuff, really. :wink:

So when the database is not closed correctly, then that new data still exists in separate files and needs to be combined. On older hardware, especially when using mechanical hard disks, this can take a while to rebuild.  Cancelling the process can leave you with corrupt data. Obviously large databases are an issue, so with POP3 where all the data is stored locally, you can expect it will take a lot longer than when only IMAP headers are stored on the computer.

The best thing is to avoid closing the application incorrectly. Some work was done in recent versions (perhaps the last year or so) of eM Client to facilitate better closing of the database, even when forced, so if you are using an older version then upgrading to a more recent version may also help prevent this issue. Before then, it was common practice to close eM Client a minute or so before shutting down. Not ideal, but saved some headaches when restarting.

I have known to close eMClient before shutting down or rebooting. But when there is a crash, like the one i just had with a bogus “disk full” error, the database check starts automatically. I am using the latest version of eMClient, (7.2.36908.0) but if I want to keep working I cannot wait until the database check happens. I am losing faith in this client.

Well if your PC is crashing because of some error, maybe you need to address that issue first, then there will not be any problem with eM Client.

Its program crashes, not PC crashes

eM Client crashes?

Yup

Hello John,

Thank you for reporting this.
From what I see in the log, it seems that your database is broken.

Please note that you have to close eM Client before making any changes in the database location, proceeding without closed eM Client can cause the database corruption.

In case you have all your data saved on servers you can simply delete the database folder and start eM Client.
It will create an empty database where you can set your accounts again. All your data should be pushed to eM Client automatically then.
You can find eM Client database here:
C:\Users%Current User%\AppData\Roaming\eM Client

To locate the AppData folder you need to view hidden folders in Windows: https://support.microsoft.com/en-us/help/14201/windows-show-hidden-files

In case that you have an account set as POP3, you can restore the old database backup if you made any in Menu > File > Restore

Regards,
Russel