Home Button  Buy Button 

Topic:   Database Corruption?

By: NathanPosted on: Nov 28 2023 at 08:44:10 PM
Hi all,

Hoping someone might be able to point me in a helpful direction please. Apologies for the long post but I've been working on this for a while and am no longer sure what might be relevant. I've taken a spin through the forum and can't see anything similar but my apologies if I missed something.

For context, I have MiniMRP v5 running on a Windows 10 machine that is only used for MiniMRP. It connects to a NAS on the local network. The NAS is running MariaDB where the database is stored.

For the past year or so, I have noticed intermittent issues where some operations seem to hang for a long time (~20 minutes) before MiniMRP locks up and has to be force closed. If I leave these operations running (even overnight), no progress is made.

Initially, the problem only presented when processing some GRNs. The software would hang, but when reopened, everything appeared to be processed correctly and quantities and costs were updated. Over the past couple of weeks it has been noticed that trying to view the parts lists of some low-volume assemblies is no longer possible with MiniMRP locking up entirely.

If I run Data ReSync, the process runs to "Read Assy Costs: 113" then freezes and I either get an error saying that it is unable to complete the sync or have to force close the app.

I took a dump of the database from the NAS via phpMyAdmin but couldn't identify any obvious corruption in a data visualiser.

I setup MariaDB running in a Ubuntu VM on the MiniMRP machine, imported the database from the SQL file and replicated the issues suggesting that the issue isn't the NAS.

In the version running on the VM I dropped all rows in the tblitemhistory and tblgrndetail tables (these were quite large and I assumed the most likely cause of the issue) but the problem remains.

I also tried renaming the local mrp5data file in case there was a local cache being held there but that hasn't changed anything.

If anyone has any ideas at this stage I would love some direction.

My current plan is to keep purging tables on the VM server until the problem magically vanishes and backtrack from there but it feels like there has to be a better way.



By: SupportPosted on: Nov 29 2023 at 05:46:22 AM
When you're using the database on SQL Server, MySQL, MariaDB then the local MRP5DATA file is no longer used so has no effect.

In summary. What I would do is do a migration FROM the NAS back to a local file. Then migrate back up to a new database on the NAS.

When you first setup the MariaDB server you must have used our SqlTools program to do that. That may have been a while ago so, just to remind you. In the c"program files(x86) folder you have the MiniMRP folder. In the MiniMRP folder is a Tools folder. In the tools folder is a program named "SqlTools". The name may be slightly different depending on the version but you'll see what I mean.

Use that tools program to connect to the MariaDB server. Once connected you'll see tabs one of which is 'Backup'. use that and it creates a minimrp backup/migration file.

If that process runs succcessfully then at least you have your data intact. Maybe at this point you ought to think about if there's a fault in your network or NAS.
You could then migrate back up to the NAS.

Now see how it runs with that new database

By: NathanPosted on: Nov 30 2023 at 06:59:31 PM
Thanks for coming back to me.

I have tried what you suggested. I created the backup from MariaDB, connected to the local file, and restored the data.

I am still having the same trouble however. The same parts lists are unable to be opened and when I ran the 'Check Resync Compact' option, it hung on 'Read Assy Costs: 114' for about 20 minutes before throwing an error saying 'Unexpected error, could not sync'.

I checked on assembly that I know to be problematic, and couldn't view the parts list on this either.

Based on this, I think it's definitely some sort of data corruption. Do you have thoughts on how I might be able to isolate and repair this?

By: SupportPosted on: Dec 1 2023 at 09:18:05 AM
When creating the backup from MariaDB did it make the backup without any errors?

Are you able to create the backup from MariaDB and send that backup file to us? Maybe in a ZIP to make it a bit smaller.

By: NathanPosted on: Dec 3 2023 at 09:11:04 PM
Yeah, no errors.

I have sent the file and look forward to hearing back.

Thank you for your continued efforts to help me figure this out!

By: SupportPosted on: Dec 6 2023 at 07:12:43 AM
Hello Nathan. The file was not corrupt. The problem was with one of your sub assemblies. It had been created with its own parent as a lower level sub assembly causing an infinite loop basically locking up evey assembly where that sub assembly was used.
I'm glad to hear that you've now found and deleted that bad sub assembly

Reply - add a comment to this topic.

You may enter letters, numbers and standard punctuation only. HTML and other scripts/tags will be rejected.

Topic:- Database Corruption?

Enter the numbers.

Your name here is optional