Files rollback after hard reboot

Hi everyone!
I have some strange issue
I have POS-machine (Point-Of-Sale) where is running our software. Sometimes it deadly freezes. In such cases just hard reboot helps. BUT after reboot I’ve an issue: the last modified .log file and database lose data about last operations (2-3 minutes). so i think opensuse somehow does a rollback.
I think this issue is related to RAM usage. when it’s full - POS-machine freeze.
Ram usage after start - 350 MB. available ram - 4 Gb.
So is there any ways to clear already writen data from RAM to prevent it’s filling.
For example to delete old data (written more than hour ago) or something.

Data may be written to caches which disappear with loss of power.

Some programs don’t like to be in swap so if memory fills it may freeze things. Dropping more memory in may fix the problem. Or the POS program may need to release memory more aggressively.

Using a lighter weight desktop may also help.4gig is rather slim these days.

Hello,
if you have access to the source code of your program, it would be wise to trigger disk writes by calling sync or fsync() or fdatasync(). Consider this direction maybe?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.