Btsync: Error "check: Too Many Open Files"


mojeda

Recommended Posts

I'm trying to sync files between 2 ubuntu servers and get the error message in the web gui "Don't have permissions to write to the selected folder"

 

sync.log in /var/lib/btsync/

 

Gives the following Error Message: Check: Too many open files

 

Seems to be hit and miss, I previously synced 1.9GBs worth of files (few hundred files) and it worked fine, however now I'm syncing just 300MBs where it's maybe 1-200ish files.

 

Edit:

 

I'm also seeing "status:144 error:Check: Too many open files meta:1 conns:0 io:0"

Edited by mojeda
Link to comment
Share on other sites

I ran the below command and it lists 711 open files in my shared folder.

lsof -Fn -u btsync | sort  | uniq | grep /shared

It's almost as if if btsync tries to sync too many files and hits the limit, it "locks up."

cat /proc/sys/fs/file-max

Shows that open file limit is set to 200k overall system.

 

I can't check the ulimit for the btsync user since it does not have shell acess however I applied higher soft and hard nofile limits for all users.

ulimit -Snulimit -Hn

Soft limit is now 20k while hard limit is 50k.

 

However the issue still persists.

 

Edit:

 

Changing the user it runs as also doesn't fix the problem.

Edited by mojeda
Link to comment
Share on other sites

did you adjust /etc/security/limits.conf and reboot? or just set ulimit -n in the init script?

you need to do one of the two. :)

I've adjusted limits.conf and restarted, yes.

* soft nofile 20000* hard nofile 50000

Users are confirming the above with ulimit -Sn and -Hn.

Link to comment
Share on other sites

It's probably inheriting limits from the system process that actually started it.

The easiest fix is to modify the init script to explicitly set ulimit. A lot of start scripts already provide a mechanism to specify it via the defaults file, but YMMV.

Link to comment
Share on other sites

It's probably inheriting limits from the system process that actually started it.

The easiest fix is to modify the init script to explicitly set ulimit. A lot of start scripts already provide a mechanism to specify it via the defaults file, but YMMV.

I've modified the init script to set the ulimit to 20k and its limit is now 20k. It finally did sync all the files but when I check for open files it still has them open. It's not closing them like I would think it should? I imagine I will just run into the same issue once it has around 20k files open still....

Link to comment
Share on other sites

I think this is related to my post here http://forum.bittorrent.com/topic/29158-1380-ubuntu-100-cpu/ and it only happens on ubuntu with the new version 1.3.80 this wasn't happening before on 1.2.X

Interesting... I only decided to use ubuntu because I didn't think tuxpoldo had a debian version of the btsync ppa repository, however it looks like it does.

 

I'm going to try it on a debian server and see how that goes.

Link to comment
Share on other sites

I was just about to start a thread about this (as I hadn't had much luck finding any solutions) - am getting the same issue with Ubuntu (on a Raspberry PI) with this version but am not having the issues with the same folder on a number of different OSs with different BT Sync versions

 

Centos - 1.1.82

FreeBSD - 1.2.82

 

Was thinking it was a problem with the ARM version or the lack of processing power with the PI but seems more generic

Link to comment
Share on other sites

Hmm - tried an older version (http://btsync.s3-website-us-east-1.amazonaws.com/)

 

And now getting connection closed issues (similar to http://forum.bittorrent.com/topic/24886-sync-over-relay-server-blocked-downloading-file-file-due-connection-closed/)

 

Doesn't seem to want to work on my Pi :( Shame, had it working a few months back


Oh, before I switched I increased the number of open files but once it hit 20k I thought it was getting rather silly.

Link to comment
Share on other sites

I'm also experiencing this problem. I had one folder with 17.2 GB and around 12,000 files that was syncing fine until I updated to 1.3.80. All of a sudden I get the " Check: Too many open files" and the webUI shows 'Don't have permissions to write to the Selected folder'. Running ubuntu 64 13.10. I reverted back to 1.3.77 and everything is working fine again. 1.3.80 eventually freezes up completely.

Link to comment
Share on other sites

I'm also experiencing this problem. I had one folder with 17.2 GB and around 12,000 files that was syncing fine until I updated to 1.3.80. All of a sudden I get the " Check: Too many open files" and the webUI shows 'Don't have permissions to write to the Selected folder'. Running ubuntu 64 13.10. I reverted back to 1.3.77 and everything is working fine again. 1.3.80 eventually freezes up completely.

 

How do I get version 1.3.77?

Link to comment
Share on other sites

How do I get version 1.3.77?

 

Not sure where you grab it offically, can't seem to find a link on the website to let you get at past versions. I saved a copy of mine before upgrading.  It is the linux x64 version. [link removed]

Edited by GreatMarko
Sync should only be downloaded through official BitTorrent Sync channels. For 1.3.77, please use http://syncapp.bittorrent.com/1.3.77/
Link to comment
Share on other sites

Softpedia seems to have 1.3.77 both 64 and 32 bit versions: [link removed]

 

If you're trying to install via PPA I'm not sure.

Edited by GreatMarko
For your safety, Sync should only be downloaded through official BitTorrent Sync channels. For 1.3.77, please use http://syncapp.bittorrent.com/1.3.77/
Link to comment
Share on other sites

Anyway for example it's not clear how to revert to 1.3.77 on "Raspbian GNU/Linux 7 (wheezy)" for example , i use the unofficial distribution

http://forum.bittorrent.com/topic/18974-debian-and-ubuntu-server-unofficial-packages-for-bittorrent-sync/

 

Could someone help me (and probably ohter person) on how to revert to previous version ?

 

There is very DIRTY way to revert: See here.

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.