"syncdb: Failed To Prepare Query To Save Metadata - 11" In Sync.log


eltopo

Recommended Posts

from my btsync 1.3.109 (running on 2 raspberry pi systems), I see many lines of 

"SyncDb: failed to prepare statement to query metadata - 11"

"SyncDb: failed to prepare query to save file info - 11"

and

"SyncDb: failed to prepare query to save metadata - 11"

in sync.log files.

 

The "SyncDb: failed to prepare query to save metadata - 11" line appears every 10 minutes, effectively wakes up usb drives and increases  size of sync,log files.

 

What do these line mean? are they serious? Is there any way I can fix that?

 

Also, is it possible to disable logging such as "Incoming connection from 10.10.20.20:52967"?

 

Thanks.

Link to comment
Share on other sites

  • 3 weeks later...

@eltopo

The error is not good. It indicates that the Sync's database got corrupt and Sync cannot save data there effectively. The most straightforward way to fix it is to remove sync folder and add it again, though it does not gives any advise on how it happened.

 

SQLite doc advises some possible reasons, so couple of questions to clarify:

1) Where Sync's storage is located? Anything special (external drive, NFS)?

2) What is the FS of volume where Sync storage is located? How is it mounted?

 

As for the "incoming connection" - it can't be removed from the log, though it should not be an issue: logs rotation is set to around 10Mb by default, so it should never grow over 20Mb (counting sync.log.old backup).

Link to comment
Share on other sites

@eltopo

The error is not good. It indicates that the Sync's database got corrupt and Sync cannot save data there effectively. The most straightforward way to fix it is to remove sync folder and add it again, though it does not gives any advise on how it happened.

 

SQLite doc advises some possible reasons, so couple of questions to clarify:

1) Where Sync's storage is located? Anything special (external drive, NFS)?

2) What is the FS of volume where Sync storage is located? How is it mounted?

 

As for the "incoming connection" - it can't be removed from the log, though it should not be an issue: logs rotation is set to around 10Mb by default, so it should never grow over 20Mb (counting sync.log.old backup).

Thanks for the reply.

 

1. The Sync's storage is on an external USB drive plugged in RaspberryPi's USB port, as well as the btsync data folders. I have a script to check if the USB drive has been mounted before starting btsymc

2. The FS is ext4, from mount cmd:

/dev/sdb1 on /media/usbdrive type ext4 (rw,noatime,data=ordered)
3. I can live with  the "incoming connection" entries in sync.log.
 
I will try to recreate .sync folder.
Link to comment
Share on other sites

Yes, I have several .db files in .sync folder, and they all have -rw-rw-rw permission for btsync process (running as nobody:nogroup); the .sync folder itself, has drwxrwxrwx permission.

 

PS, since I recreated .sync folder on one of my raspberryPi, I haven't seen the issues, thank you, RomanZ!

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.