This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

All data in the database is gone after an alert
#1
Hi !
In my environment I had my LM running for over 3 years. 
Yesterday, for the first time all data in the database was gone and all objects and scripts are lost.
I can see alert log but there is no other log or error log.
Have you ever experienced this ? How can I avoid it from happening?

Attached Files Thumbnail(s)
   
Reply
#2
Most likely a problem with the microSD card in LM. Run this script once and post what you get in Logs tab:
Code:
files = io.ls('/data/dbfail/')
log(files)
Reply
#3
Thank you for looking into the inquiry!
This is what I got after executing the code.

Attached Files Thumbnail(s)
   
Reply
#4
Run this and post the results:
Code:
res = io.readproc('ls -l /data/dbfail/')
log(res)
log(io.readfile('/data/dbfail/1.log'))
log(io.readfile('/data/dbfail/2.log'))
Reply
#5
Thank you admin : ) This is what I got !

Attached Files Thumbnail(s)
   
Reply
#6
It looks like you have a power fail when LM was saving the database to disk.
Run this once then reboot LM:
Code:
os.execute('cp /data/dbfail/2.db /data/storage/scada.db')

See if your objects and scripts are restored.
Reply
#7
(03.10.2025, 08:39)Hadeel Wrote: Hi !
In my environment I had my LM running for over 3 years. 
Yesterday, for the first time all data in the database was gone and all objects and scripts are lost.
I can see alert log but there is no other log or error log.
Have you ever experienced this ? How can I avoid it from happening?

Hello,
I installed my LM for a small project approximately three months ago.
About one month ago, the LM began rebooting every morning at irregular times, typically between 5:45 and 6:15.
The issue is that yesterday I was able to see valid trend data, but today—after the reboot—the trend history from yesterday is missing, and only constant values are displayed.
I replaced the LM with a new unit, but the behavior remains the same.
Could you please advise on the next steps to resolve this issue?
Reply
#8
You probably running out of memory and this is why LM reboots. Check what could be the reason, System load app may help.
------------------------------
Ctrl+F5
Reply
#9
(04.12.2025, 08:29)Daniel Wrote: You probably running out of memory and this is why LM reboots.  Check what could be the reason, System load app may help.
Okay, but if the LM stopped me from creating trends, how would I end up running out of memory?

When I create trends, I don’t get any alert that I’m running out of memory.
Reply
#10
Trends is not the only thing which use memory.
------------------------------
Ctrl+F5
Reply
#11
Check your event scripts, there might be a loop between scripts somewhere.
Reply
#12
I only have two scheduled scripts with some IF conditions.
I haven’t seen any loops here.

Could you give me a checklist of what I should review?
Reply
#13
Send me your backup to PM. Use some file storage tool and drop a link.
------------------------------
Ctrl+F5
Reply


Forum Jump: