Checking for Corrupted Database after each Windows restart

Hello, we are currently evaluating eM Client as a viable Thunderbird and Outlook alternative for our organization. Right off the start, we are running into a problem that may be a show stopper.

We are testing eM Client on a vanilla Windows 10 system with no other software installed. eM Client is configured to auto start when Windows starts. After each time Windows is restarted, for example via START > Shutdown/Restart, or via Windows Automatic Update, eM Cllient is running a lengthy check for database corruption on the next run. The dialog says that the application wasn’t shut down correctly.

Our repro steps are as follows:

Prerequisites:
a) Install Windows 10 on computer
b) Download and install eM Client 9.2.1222
c) Configure eM Client to start automatically with Windows
d) Configure an IMAP email account

Repro:

  1. Click START > Shutdown, or START > Restart, or run Windows Update and wait for Windows to restart automatically eventually
  2. Log into restarted Windows

Observed Behavior:
eM Client runs a check for corrupted database, because it “was shutdown incorrectly”

Expected Behavior:
eM Client starts normally and does not corrupt the database.

Frequency:
5/5

I understand from a quick forum search that this problem has been around since at least 2012 and has been reported repeatedly over the years. Are there any immediate plans to fix this permanently?

Thank you!

Checking the database for errors on startup.

Are you closing / exiting eM Client before shutting down or restarting Windows either via the “X” at the top right or via a the “Menu / Exit” at the top left ? If you don’t you will normally get database checking errors on startup as it’s still open.

If you are already closing eM Client (before shutting down or restarting), try “waiting a couple of seconds” (to give the mail database time to fully close in memory). So you might be shutting down or restarting your computer (too fast) and it’s still not completely closed in the background. So waiting aprox 2 seconds should fix it.

Now if waiting aprox 2 secs before shutting down or restarting Windows makes no difference & still checking for errors on startup, then this can also sometimes be related to what else is in memory at the time.

So after closing eM Client and waiting aprox 2 secs, open your task manager and check if eM Client is still showing as open ?. If it is still open / showing in memory, temporarily disable all other non OS background startup tasks and reboot and see if eM Client then opens and closes probably in the task manager.

If it then does open and close ok in memory after aprox 2 secs or so, you know it’s one of those other startup background tasks and you then need to enable them one at a time & reboot in between till you find which one is causing the conflict.

The only other time you can get checking database for errors on startup is if you do have an actual corrupted database where you would then need to either eg: restore an old database or remove and readd your account again, but that would be unlikely on a brand new setup.

Alternatively if you want to keep eM Client open and shutdown, you could also use the (Shutdown / Sleep option) in Windows. I use that on occasion.

I understand from a quick forum search that this problem has been around since at least 2012 and has been reported repeatedly over the years

This is not a current problem with eM Client.

.

For a moment I thought your suggestion is that all users manually exit eM Client, then wait a few seconds, perhaps ensuring in Task Manager that the app is no longer doing anything, and only then shutting down or restarting Windows. Likewise, we would disable Windows Update and disallow any software installations that require restarts while eM Client is running…

… and then I realized that’s exactly what you said.

Windows does provide APIs for notifying applications about shutdowns and to allow them to cleanly exit in case they need more time. Does eM Client not make use of this, so that Windows kills the process?

This is not a current problem with eM Client.

My apologies for creating an account on this forum just to report this problem for the current version :slight_smile:

Windows does provide APIs for notifying applications about shutdowns and to allow them to cleanly exit in case they need more time. Does eM Client not make use of this, so that Windows kills the process?

I don’t know if eM Client uses that API, only that when eM Client closes it has to close the database (which can sometimes take a few seconds) depending on the database size and how quick your harddisk / memory can close it.

Note: I’m sure the eM Client Devs would be using the latest APIs etc.

So to avoid any possible error checking from my own experience wait approx 2 secs after exiting. Alot of users dont, but to be on the safe side I would recommend to do that to avoid issues.

Note: I and my bro personally haven’t had any checking with database errors on startup for years using Win 10 or 11 on pretty much stock Windows PC’s using now eM Client V9.2.1222 . We have 3 IMAP accounts and 1 POP account.

1 Like

The problem also appears if POP accounts are used.

If I let windows shut down eMC as opposed to manually doing so with the “X” I get a database corruption requiring a 45mins repair on restarting windows about 50% of the time.

Periodically eMC will crash randomly when opening neccesitating another 45min repair. This has led to some embarassing moments when talking to clients.

Interestingly, if you stop the repair by pressing “cancel” shortly after the repair starts and then shutting down eMC it mostly will restart without the repair being needed. This is very odd and clearly indicates some sort of bug as the 45min has been bypassed. It either forgets that there is a repair needed or it was a false alarm to begin with.

By the way, it takes 45min in my case as I store a lot of email.

As this problem with eMC has been reported time and time again in the forum for a very long time, I would suggest some sort of hackathon is needed. I use around 30 windows products and 29 of them are stable as a rock.

This is probably the single most annoying “feature” within eMC. Other than this I love the functionality and it is a great application to work with. It beats the competition hands down.

1 Like

@Thos

If I let windows shut down eMC as opposed to manually doing so with the “X” I get a database corruption.

Yes If you shutdown Windows without closing it first, then you will get a checking for errors on opening eM Client. That’s unavoidable as the eM Client program & database needs to be closed before shutting down Windows.

Suggest if you forget to shutdown and your database is taking 45mins to repair as you advised, then you would be much quicker to restore a good non corrupted database via “Menu / File / Restore”. So you can either do a manual backup of eM Client at any interval through the day via “Menu / Backup”. You can see when the backup is completed via “Menu / Operations”, or you can do periodic automatic backups via “Menu / Settings / General / Backup”.

The other alternative as I mentioned above, if you want to keep eM Client open, you can use the (Shutdown / Sleep option) if your computer supports that. I use that also sometimes.

Periodically eMC will crash randomly when open neccesitating another 45min repair. This has led to some embarassing moments when talking to clients.

eM Client crashing randomly is usually related to a local computer issue normally caused by something else running in memory interfering with eM Client. So if your eM Client program version is up to date and your Windows OS version & patches are all up to date, then suggest you try “disabling all non os background tasks temporarily” for a test and reboot and see if that stops the random crashing. If it then does stop, then enable those background tasks one at a time and reboot in-between till you find the program doing it.

Now if disabling background tasks makes no difference to the eM Client crashing randomly problem, then you might have a problem with the eM Client installation somewhere, in which case try reinstalling the program. Close eM Client and uninstall via the usual Windows uninstall and “don’t delete the database” when asked on the uninstall wizard. Then redownload your same or later version of eM Client via the release history page and reinstall & see if that fixes it.

[quote=“cyberzork, post:6, topic:86928”]
Yes If you shutdown Windows without closing it first, then you will get a checking for errors on opening eM Client. That’s unavoidable as the eM Client program & database needs to be closed before shutting down Windows.
[/quote]

Is this now the formal way to shut down eMC and windows? You have to manually shut down eMC before shutting down Windows? Yikes! This is the only program I have that needs to be manually shut down prior to closing windows. Incidentally, I can confirm that eMC also often corrupts its database after putting windows into hybernation or sleep mode. It does not matter if you shut down windows or simply put it into hybernation. eMC will corrupt its database.

All my other applications (this is what I have open as I write this) , Office 360, Fusion 360, Foxit, Chrome, Zoom, Firefox, Tawk, WhatsApp and a Remote Desktop (for a remote copy of MS Access), will all gracefully shut down and ask to save any unsaved work before windows shuts down. Why does not eMC not do this?

“…you would be much quicker to restore a good non corrupted database via “Menu / File / Restore”. So you can either do a manual backup of eM Client at any interval through the day via “Menu / Backup”. You can see when the backup is completed via “Menu / Operations”, or you can do periodic automatic backups via “Menu / Settings / General / Backup”…”

The problem here is that making a backup takes way too long. I decided to run one right now and I am about 30% done after 1 hr… If I do a manual backup at intervals thoughout the day I will be doing nothing but backing up. As eMC does not support incrimental or journalling this is way too cumbersome. Not only that, my laptop SSD is not large enough to support this. I was told by Gary that inorder to make a backup I need to have at least the same amount of empty SSD space as the backup. My current backup is 210Gb and my eMC folder is 226Gb. My SSD is 1Tb and it has 114Gb free. Everytime I make a backup I need to move some files to an external HDD and then move them back after the backup is complete. Backing up eMC is a full time job. It would certainly be very useful to be able to make a “maintenance” repair on the database at will. A function that eMC does not have. I could then set up a routine to do this when I finish work a couple of times per week and make the backup after work.

It is vey curious that the forced repair does not reoccur if I have force stopped (cancelled) the repair in the previous session.

“… So if your eM Client program version is up to date and your Windows OS version & patches are all up to date, then suggest you try “disabling all non os background tasks temporarily” for a test and reboot and see if that stops the random crashing…”

The problem with this is that these random crashes are very random. I can go for a week with no crash, or it happens twice in a day. disabling background tasks and trying to only run eMC will neccesitate me taking 2 weeks holiday and sitting infront of eMC for 9 hours per day. Sorry, I cannot do this !!

“… Now if disabling background tasks makes no difference to the eM Client crashing randomly problem, then you might have a problem with the eM Client installation somewhere, in which case try reinstalling the program. Close eM Client and uninstall via the usual Windows uninstall and “don’t delete the database” when asked on the uninstall wizard…”

This is great idea. I will try this. Thank you.

What is interesting to me is that the symptons I am having is so similar to the OP. The advice that you have given him is the same as mine… You MUST shut down eMC manually and not let windows do it for you. This is a huge problem for the OP and myself. Can nothing be done to enable this basic functionality that almost all windows apps seem to manage? As the OP wrote: “Windows does provide APIs for notifying applications about shutdowns and to allow them to cleanly exit in case they need more time. Does eM Client not make use of this, so that Windows kills the process?”

Thanks for your help. I will try to reinstall eMC while saving the database first and see what happens.

Is this now the formal way to shut down eMC and windows? You have to manually shut down eMC before shutting down Windows?

This has allways been the case as is designed. If you shutdown Windows without closing / exiting the program, you risk corrupting the database as the program and database is still open in memory. As you said Windows just kills programs on shutdown and unfortunately doesn’t most of the time wait for programs and databases to close cleanly. This is an OS issue.

As I said the only other option is shutting down in sleep mode which does work for me personally using my Win 10 & 11 desktops and eM Client V9.2.1222 but as it doesn’t work for you, then recommend to close eM Client first.

My current backup is 210Gb and my eMC folder is 226Gb.

Have you considered then moving to IMAP or Exchange ?, as could be that eg: POP accounts were possibly not designed to handle that much mail in the client. eg: Even Outlook with .pst or .ost files wouldn’t hold that amount of mail as we’re around 30-50GB max. You had to delete mail if you reached the limit or could risk corrupting it. So I would worry storing that amount of POP mail locally as might then be on the point of crashing anytime as a result of the very large size.

Be interested to know if there is other users on this forum with POP accounts who have that much local mail in eM Client & if they have any similar problems.

Thanks !

I need to keep these email as there is a 10 year requirement to keep business documents available. I am certainly not going to print out all my emails. This quantity was never an issue with The Bat Do you think IMAP would support this volume of data?

If there is a data quantity limit in eMC I need to know… It should be a published number.

My CRM system is at least as big.

“This has allways been the case as is designed. If you shutdown Windows without closing / exiting the program, you risk corrupting the database as the program and database is still open in memory. As you said Windows just kills programs on shutdown and unfortunately doesn’t most of the time wait for programs and databases to close cleanly. This is an OS issue.”

How come this program is the only one that has this issue if it is an OS problem? I never had corruptions with The Bat and any other program if I did not shut them down first. Yes, 10 years ago this was a problem, but not recently.

Do you think IMAP would support this volume of data?

You can buy as much mailbox space as you want from most major cloud providors so I don’t think that would be an issue, but you can sometimes get performance issues with extremely large mailboxes “depending on the cloud mailbox providor”. So you would need to query / discuss that with the various cloud providors as well as the monthly and yearly costs for that space.

If you do decide to change to an IMAP account, just add in the new account in eM Client, and then drag / move all your POP mail and mail folders to the IMAP account. To avoid any errors as you get random crashes, suggest to then only do a small selection at a time till they are all there.

Also do a complete eM Client backup before doing that. Suggest as it takes so long for you, leave it on overnight. Also make sure there are no errors in the Operations after completing that. As prev advised go to “Menu / Operations” to view that.

How come this program is the only one that has this issue if it is an OS problem? I never had corruptions with The Bat and any other program if I did not shut them down first

I would say you were very lucky with other programs especially with that amount of mail they also didn’t get corrupted. Normally if you leave programs open in memory or resident and just shutdown Windows you will normally get errors when reopening those programs again.

I can’t comment on the OS shutting down eM Client properly during a OS shutdown (I always close my apps manually prior to any reboot) since like @cyberzork I put my computer to sleep all the time, but I can say when putting Windows 10 to sleep, I never have it crash or require a database repair when coming out of sleep, so that is not normal. I would try @cyberzork suggestion of removing and reinstalling the latest version of eM Client and see if that helps.

When eM Client crashes randomly does it pop up the crash report to send to eM Client? If so, I would keep sending those reports to them since I am sure it will contain information to help them provide a fix in a future update if the crash is related to a eM Client bug.

2 Likes

Thank you Lancealot,

I just had a crash - eMC simply froze! I could not click on anything and nothing would open. I had a few eMC windows (6 i think) open and I could not switch between them. After about 5 minutes the progam simply closed on its own including the open emails. No error message.
I was trying to find a specific email using the search/filter function at the time.

On re-booting eMC went into its usual 45min repair routine. Very annoying as I have a Zoom call sheduled in 30 minutes and the details are in eMC. Now I have to try to get to the meeting using Zoom directly and will need to ask someone to send me the link via Whatsapp.

No other program on my computer crashes like this!

Thomas

Since you said your eMC folder is 226Gb, and at the time it froze you were doing a search, it is possible it is getting hung up while doing your search on that large amount of data. Is it only freezing during searches? If you load up the task manager while it is frozen is eM Client using any resources?

Since you said you completed the db repair scan successfully and it still freezes afterwards and eventually shuts down, then maybe your best bet might be to file a ticket with VIP support to see if eM Client techs have any suggestions. Makes me wonder if it might be choking when dealing with very large datasets. Maybe someone else on here with a local dataset of 200GB+ might be able to comment how well eM Client handles datasets of that size.

2 Likes

Hi Lancealot,

It seems to happen mostly when manipulating emails.

One sure way to get the program to crash, I have just dicovered, and have repeated several times is “drag and drop”. If I have a file and I want to add it to an email it seems to work if I drag a file from another email. If I pick up a file from my File Explorer it will crash frequently, but not always. If I pick up an image from a browser window and drop it into an email eMC crashes immediately. I am using Firefox and all my programs are up to date.

Maybe someone can try to repeat this. Search in a browser for an image and then drop this into an email.

The crashes I get when searching seem to occur when I am in the process of setting up a search function. If I add a search word to the search box and hit enter the program starts a search automatically. If I modify the search critea while it is searching such as adding “body” to the search I periodically get a crash.

Personally I think the search function in eMC is a muddle. I would much prefer a “boolean tree” search where multiple search parameters can be set up in sequence. I have asked for this as a feature request and would suggest to completely rework the whole search function.

2 Likes

I am using Windows 10 and eM Client 9.2.1222, I tried two different web browsers and dragged multiple images straight from the browser into the eM Client compose window without any issues (no crashing at all). So I am not able to duplicate that issue where dragging images from the browser window into a new email email window crashes eM Client. Since I only have Windows 10 to test with, if you using another OS, specify which and maybe another user in the forum can test it for you.

When it comes to the search crashing the client, I know you said you are searching a dataset of 200GB+, which I suspect takes time and allows you to change the search parameters while a search is still processing. What if you wait for the search to complete and then change the parameters, does it crash then? Or does the crash only happen while a existing search is processing and you try to start a new search?

The eM Client search might not be perfect, but it is still better then a lot of other emails clients offer. Hopefully your search feature request is considered for a future update, since I am sure the eM Client developers will continually look for ways to improve upon current features when possible.

Hi Lancelot,

This morning eMC crashed 3 times before noon. Each time I was doing something different. It happened when I was moving an open email from one monitor to another. Another time I was searching some emails. The last time I was simply opening an email.

Each time the program freezes for about 15 seconds and then simply closes. I let the program repair itself each time which took 45 minutes. My working life is a misery as a result of this. No other program on my computer does this and I am using dozens of programs all the time, some of them are local and other web based.

I deleted eMC and copied the database onto an external disk. I also selected not to delete the data set and eMC found it when I reinstalled the program. I then reinstalled eMC and AFTER " HOURS IT CRASHED AGAIN. This time it even removed itself from the Taskbar and I had to move it back there.

I did not have time to let it repair itself so I cancelled the repair process within 20 seconds. I closed the program and restarted it. THERE WAS NO REPAIR needed. I do not understand why it is corrupted the first time and then not the second. This question really needs to be answered.

If eMC is not able to handle my 200Gb+ file base then someone really needs to tell me what the maximum is that eMC can handle…!! I do not want to delete any emails unless there is no choice…

I am now very frustrated and my working life is seriously affected.

1 Like

One thing I am surprised about is when it crashes it doesn’t give you some type of window telling you it crashed and give you the option to send the crash report to eM Client. The few times eM Client client has crashed for me it has given me this ability to send the crash data to eM Client so they have information to go on.

It always does the repair if eM Client didn’t close properly. Just because it didn’t close properly doesn’t always mean the database got corrupted, it does the check just to be safe. So when you cancelled and then closed it down and re-opened, it didn’t need to do another repair check since you closed it down properly.

I know eM Client uses SQLite to store its data into, and SQLite can handle sizes up to 281TB, so I don’t think it is a size limit. It sounds more like something is conflicting with eM Client and causing it to crash, or something is getting hung up in eM Client with a data set that large causing it to crash. If you have the ability, have you tried copying your database dataset to another computer running eM Client to rule out it is not something with that specific computer?

If the above is not possible, then all I can suggest is that you use eM Client’s VIP support to try to get support directly from an eM Client support staff. They should be able to help you get some diagnostics in which it can help them look into the issue.

eM-Client is a real rubbish when it comes to local e-mail database management. I’ve been using Thunderbird and The Bat! for 20 years and both of these programs worked flawlessly. eMC has a very nice looking modern inferface, but it’s slow, bugged and can’t handle basic low-level tasks properly. Developers know that but they pretend they don’t see it.
My e-mail database is not huge (less than 1GB) but my eMC needs now 4 minutes to open and this time is constantly getting longer as I archive more emails there (few months ago it was “only” one minute).
I used eM Client for a couple of months and it was a waste of time and money. Now I’m migrating back to my previous solutions.

@Naureka

eMC has a very nice looking modern inferface, but it’s slow, bugged and can’t handle basic low-level tasks properly. Developers know that but they pretend they don’t see it.

My e-mail database is not huge (less than 1GB) but my eMC needs now 4 minutes to open and this time is constantly getting longer as I archive more emails there (few months ago it was “only” one minute)

That is not the case for myself or my friends & family who use the same eM Client version with very large databases on Windows & Mac with multiple POP and IMAP & Exchange accounts.

eM Client loads for us within a few seconds everytime and performance is very quick using the GUI. So I personally cannot fault it.

There is also many other users on this forum who have very large POP & IMAP databases that also load quick and perform quick with no issues.

So whatever the issue is you & @Thos are experiencing, need to be diagnosed with eM Client support directly with (diagnostics from your logs) etc sent in as @lancealot advised above and I also advised previously on your other threads.

But as you personally were not happy with trying things to diagnose & resolve the problems with eM Client support (when you previously did) from comments on your other threads, then unfortunately there is nothing we can further do on this free forum to help you.

1 Like

Hi Cyberzork, thanks for trying to help us. I went to the logging function to set up a log report. There are dozens of options and none of them seem particularily suitable to dignose regular crashes and the documentation is non-existant on this. I therefore clicked every option and will see what happens.