"database disk image is malformed"

Good day, I am using the DataLogger service on an Axioline F 1152. It was working for just over a week but then the runtime failed. I performed a cold start to get the program to run again but I received the following Error message from the DataLogger (seen in the cockpit notifications image attached). Session ‘Building_C’: Caught exception ‘Could not insert values into database. Error: database disk image is malformed’ during publishing. Publishing stopped. Using WinSCP to copy the database file to my PC then I deleted the database file, rebooted the controller and it seems to be logging again. Does anyone have an idea what might have caused this error? I would like to try to avoid it happening again. Thanks!

Hello d_austin, I assume the data sink is corrupted. Please try to delete the data sink on plcnext controller and restart your application.

The data sink can be damaged if the power supply to the PLCnext controller is interrupted and the data sink is not closed properly.
If possible, please use the USV to avoid this case or/and use the Option “File Rollover” to save the data in several data sinks. Best Regards Eduard

Hi Eduard, What is the USV and how can I use it? Thanks, Damian

Hi Damian, USV = “Unterbrechungsfreie Stromversorgung” This is the German term for an uninterruptible power supply (UPS). ~ Martin.

Hi Martin, I am actually using a Quint DC-UPS so I don’t think a power interruption caused the files to be corrupted. I extracted the files and they were readable so they weren’t corrupted. I’ll enable rollover, I think the file size might have been too large. Thanks, Damian

Hello Damian,

could you provide me following information please:

1. AXCF1152 FW Version
2. DataLogger Configuartion file: you can copied it in follwing directory on the plcnext target: /opt/plcnext/projects/PCWE/Services/DataLogger/pcwe.xxx.dl.config
3. The Size of the reached data sink size in yor application before the error occurred. I would like to reproduce this behavoir. Thanks, Eduard

Hi Eduard, 1. FW: 2021.0.0 LTS 2. The file type is unsupported but it’s contents are as follows:

3. I, unfortunately, don’t know what the data sink size was. All I can say is that there were 3 instances of the DataLogger running, each set up identically (I don’t have their config files but they would be the same as Building_A. I hope this helps, Damian

Hello Damian, thanks for the additional information, unfortunelly the Building_A. will be not showed in your last post. Could you upload it again or send me the Screenshot via email, please? mailto: emuenz@phoenixcontact.com Thanks & Best Regards Eduard

Hi Eduard, My apologies, I don’t know why that came out blank. I have emailed you the config file for building A. Thanks, Damian

Hello Damian, Thanks for the config file (I received it). I’ll try to reproduce this issue and will give you a feedback via email. Best Regards Eduard

Hello Damian, Thank you for sending the configuration file. I am assuming the error was caused by the delete rate of 30% (default value) and the data sink size of 500MB. In this case, the DL session delete the 150MB of the oldest data (when data sink reaches 500MB) and this operation is very expensive. I would like to recommend that you use a smaller data sink size (e.g. 5MB-150MB) with the lower erase rate (5%). Or you can configure the file roll over and generate 10 rotating data sink files to avoid the complete data loss. Here is Example: Regards Eduard