Page 1 of 1
MLS won't restore database on stake computer
Posted: Wed Dec 05, 2012 4:08 pm
I am having an issue where MLS on the stake computer cannot restore the latest backup. If I go back to my backup from 11/3, it can restore that but I am missing a month's worth of changes. I can take the 12/4 backup and restore it on another machine, so I am pretty sure that the backup is not corrupt.
What happens is that I request the restore, select the file, and then after about 20 seconds I get a dialog with a frowny face that says "Error". I have looked at the mlslog.txt file and it is showing an out of memory error for Java. I increased the page file size to 3GB, but that didn't seem to make any difference. The machine is getting a bit older (Optiplex 740 with 960MB of RAM), but I really need to get things back up and running if possible.
Any suggestions? Can I take the database folders directly from the machine that is working and put them on the stake machine? Can I increase the amount of memory available to Java so it won't run out? I am guessing I must be on the very edge since the 11/3 backup works but not the more recent (and presumably larger) 12/4 file. I could buy more memory for the machine, but it is almost 4 years old, so due to be replaced soon.
Posted: Wed Dec 05, 2012 5:11 pm
The OutOfMemoryError is a JVM (Java Virtual Machine) memory error that can be related to available machine memory. It is not related to the size of the database MLS is using. It is an MLS program issue that you cannot control.
I suspect you may have MLS program files problems. Perhaps you can shed some light on the source of the problem by telling us why you needed to restore from a backup.
My first step whenever MLS misbehaves is to do an on-top install of MLS. This generally fixes most issues related to corrupt or missing files as well as some hard drive errors preventing proper read/write to some program files. This is a relatively easy step to take before taking more complex or time consuming measures.
Posted: Wed Dec 05, 2012 5:38 pm
Sorry - I should have included more info. I am an electrical/chip engineer, so I have a pretty good understanding of what goes on under the hood of a computer. I know that the memory error is not directly tied to the size of the restore file, but had guessed that the restore process may be requesting more memory in order to restore a larger file. Given that someone rewrote the backup code for 3.5 (it used to take 20 minutes to do a backup and now it takes about 50 seconds for our stake data - thank you for that, by the way!), I wasn't sure if they traded off memory usage for performance. The restore process may not have been changed, but you never know...
Last year, we had a time period where all of our backups were corrupt but we didn't know it since we never use them. We had an issue come up with MLS and when we tried to restore, we ended up having to go back about 4 months to get a valid backup file. Since then, I routinely test our backups on another computer. Since the 3.5.1 update, the backup has been saying it could restore but finance would be locked. This seemed strange since finance was not locked on the stake computer. I spoke with LUS and they said that the finance file was queued, so last night I went down and did several send/receive cycles to try to get the file. I did a backup and then tried to immediately do a restore to see if the same message would come up. When I did so, I got the "Error" dialog. I logged out and when trying to log back in, I got a cryptic message about not being able to find the user name in some file, it had tried to recover my data and failed, and I would have to restore from a backup. I didn't have my test machine with me (laptop with a windows virtual machine installed), so I tried it on the stake computer. You can say that wasn't a good idea, but if I can't restore a backup I just made when restores have been working on the test machine, then something is broken in the program.
I have tried installing MLS over the top, removing MLS and reinstalling, clean removing MLS and reinstalling. All give the same Error message when I try to restore from my latest backup. This exact same file will restore just fine on my test machine, so it seems to be a problem with MLS. Given the Java memory error, I think that there must be an issue with the restore process trying to use more memory than we have (but I'm not sure why a larger VM file didn't help).
LUS punted and suggested that we reinstall windows, but that is a major pain that I would like to avoid if possible.
Posted: Wed Dec 05, 2012 7:37 pm
OK, I'm out of ideas.
Posted: Thu Dec 06, 2012 9:52 am
For anyone else watching this thread, I have figured out a solution. After poking around a bit more on the web regarding java heap size, it looked like mls just wasn't getting enough memory allocated when Java started. I ran a command to determine the maximum memory that could be allocated to java and it seemed to be about 1600 MBytes. So I went into the the MLS directory and manually ran the jar file from the command line and told java to take 1600MB as its maximum heap. MLS started up and I was then able to restore my backup just fine.
Hopefully this would only be an issue for a stake (much larger backup file) running on an older computer (1GB total RAM), but if anyone else runs into it, I can try to help you with the necessary gyrations on the command line... :-)
Posted: Thu Dec 06, 2012 10:50 am
Good going! Knowing that fix worked no doubt helps the developers know what they need to do to fix that in a future version.
Re: MLS won't restore database on stake computer
Posted: Thu Dec 13, 2012 9:37 am
I'm glad I stumbled onto this thread. Just last night, I installed MLS 3.5.1 onto a computer, and tried to restore a backup made on the stake computer last week. The restore seemed to work, but I couldn't login. I think I got the same error message as stated above, something about a file not found or corrupted.
I uninstalled MLS and reinstalled it, but that didn't delete the corrupted database files. After some searching, I found them in C:\ProgramData\... I deleted the entire directory of MLS data files for my unit, started MLS, restored data from the backup file again, and all was well.
It looks like MLS 3.5.1 wanted to restore the files to a clean (non-existant) directory. I am just guessing that my unit directory may have had some really old files from a previous test installation, and MLS 3.5.1 didn't like them. I know that is a long shot guess, but I couldn't think of anything else.
I was just surprised that an uninstall of MLS did not also delete the old data files from C:\ProgramData. I suppose that was meant as a feature.
I didn't get the "Error" dialog or anything about the JVM running out of memory.