nraboy

Sync crashing on Raspberry Pi 3 while syncing

Recommended Posts

Hi,

I recently purchased Sync Pro from Resilio, but it seems to be having issues on my headless Raspberry Pi 3 backup server.

My setup is as follows:

  • Raspberry Pi 3 with Raspbian Jessie Lite
  • Resilio Sync 2.4.1 for Linux ARM

During the install process, I've created the following Sync configuration file:

{
    "device_name": "Raspberry Pi Backup",
    "listening_port" : 0,
    "pid_file" : "/var/run/btsync.pid",
    "use_upnp" : true,
    "download_limit" : 0,
    "upload_limit" : 0,
    "webui": {
        "listen" : "0.0.0.0:8888",
        "login" : "admin",
        "password_hash" : "MY_HASH_HERE"
    },
    "recv_buf_size" : 64,
    "send_buf_size" : 64,
    "max_file_size_for_versioning" : 250
}

I've successfully synced a few folders, but now the process seems to die about midway through new folders.  The only way to get it back is to reboot the Raspberry Pi because restarting the process asks for a Sync id again rather than using the already existing id.

I've read in the forums that Sync has some issues with memory management.  Does this mean Raspberry Pi devices should not be used?  I thought NAS drives have low memory too, so how come those work?

Any information would be helpful.  My goal here was to back up the various directories in my Mac user directory to the Raspberry Pi.

Thanks,

Share this post


Link to post
Share on other sites

can you please clarify a few things: 
1) why use "pid_file" : "/var/run/btsync.pid", if you run rslsync? 
2) how you launch Sync? note that if you don't have 'storage_path" in config, Sync will create its storage in your current directory. SO if you launch it from a different location each time, new storage will be created and Sync will start as if it's freshly installed. 

Not sure what memory management issues you mean. But the thing is that if you have big shares with a lot of files and high activity in there, database for these shares will grow big. Sync loads its database in memory on start and keeps it there. So your device may be just lacking RAM and force killing Sync. In this case in Kernel log you might see "Out of memory: Kill process <sync>" . 

Share this post


Link to post
Share on other sites

Good question!

  • I had copied that from a guide, and didn't even notice it was btsync rather than rslsync.  Think that makes a huge difference?
  • I didn't set a storage path.  Not sure what it is defaulting to as it starts as soon as I turn on my Pi because of the systemctl daemon scripts.  But that is a good point!

My Sync folders are huge, but don't change often.  For example my Apple Photos library is all kinds of crazy, but it changes a few times a month.  Are there any ways to limit how Sync stores things in RAM?  I don't need it to be fast, I just want to know it is backing up occasionally.

Any recommendations?

Thanks,

Share this post


Link to post
Share on other sites
17 hours ago, nraboy said:

 Think that makes a huge difference?

no, provided that pid file 1) exists, and 2) available for rslsync process. 
 

17 hours ago, nraboy said:

it starts as soon as I turn on my Pi because of the systemctl daemon scripts

well, package has its own config (/etc/resilio-sync/config.json) with storage pointing to /var/lib/resilio-sync/, and pid also mentioned there. 
Or did you edit that config and change to the mentioned above? Or you actually now have two sync instances running? So the question remains - what Sync and how you actually launch. What Sync processes are actually running , with what parameters.

No, there is no way to limit RAM.

Share this post


Link to post
Share on other sites

I can confirm that Resilio crashes often for the Linux arm version, both on my Raspberry Pi, and on another Debian based VPS. In fact, I needed to write a script to check if sync dies every hour and then restarts sync if it is dead.

BTSync worked fine until I upgraded to rslsync. :(

Share this post


Link to post
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.