[Raspberry Pi] Database Error


Recommended Posts

Hi,

I am experiencing a very annoying issue on my Raspberry Pi with Raspberry Pi OS and Sync 2.7.3.

I have 25 synced folders in my list and whenever I start my Pi (or restart the sync service), some of them show "Database Error". The database is not actually corrupted, because when I restart the Pi or the sync service, it will be other folders that show the message, sometimes more, sometimes less. But I can rarely ever get all of the folders to load correctly.

I think this might have to do with Sync trying to open too many files at the same time and that this could be fixed by retrying the failed folders after the other ones have been processed. Unfortunately there is no such option.

Yes, I have seen the help center page. Re-adding won't help as the folders are not actually corrupted.

Don't wonder about the "folder not found" message, this is expected.

2023-05-20 10_44_59-raspberrypi400 (raspberrypi400) – VNC Viewer.png

Link to comment
Share on other sites

If you use SD card for Sync storage, you might have hardware problems, use dmesg to check system/kernel errors. 

I suggest that you get a good brand (SanDisk/Samsung, etc.) portable USB SSD drive for Sync.

Link to comment
Share on other sites

All the data is stored on an HDD. The metadata (database) seems to be stored on the SD, as the messages appear even before the HDD is connected. And as I said before, after restarting the service, the cards are being reshuffled. Some broken ones will work again, other ones will break. Sometimes almost all of the folders have the message, sometimes it's only 1-2 of the 25.

Link to comment
Share on other sites

12 minutes ago, eltopo said:

I would say it's a sign that your SD is not reliable. Move "storage_path" to your HDD from SD card (using config mode)

See:  Sync Storage folder – Sync (resilio.com)

In this case, can I still attach the HDD at a later point?

Btw, I also see an error message "Too many open files" after attaching the HDD. In this case it will recover automatically after a while. But this is also a reason why I was suspecting some OS/concurrent access limitations.

Link to comment
Share on other sites

If you frequently attach/detach your HDD, you probably should modify your script to check if the HDD is attached before you start rslsync, and stop rslsync before you detach it.

For "too many open files" message: you need to increase "open files" number, check "ulimit -n" for your current number, change it to a bigger number, such as "ulimit -n 50000", in your rslsync script.

See: How to Solve the “Too Many Open Files” Error on Linux (howtogeek.com)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.