Adjusting syncthing 'exchangeHello' against high latency links

Hi guys,

I have been working with some remote locations in the Brazilian Amazon and syncthing solved a big issue I had sharing files with remote partners.

Issue is they are in very isolated places or even boats, where latency on a very good day is 1200ms, but in general is above 1500ms with up to 20% loss (VSAT and BGAN)

After doing some lab over here, I found that syncthing ‘exchangeHello’ was failing because of high latency.

So I went to the source code (thanks for it) and adjusted the line on src/github.com/syncthing/syncthing/lib/connections/service.go+557 :

if err := c.SetDeadline(time.Now().Add(2 * time.Second)); err != nil

to fit my needs (sometimes up to 10s), and compiled it.

This solved my issue, and it is working greatly are really helpful.

I can continue applying a patch and compiling the source for every new release I decide to use, but maybe I’m not the only one with this issue and maybe we can just have an option to adjust it - lets say between 2 and 10 seconds.

What do you guys think?

At last but not least, thanks for this great software.

Tenorio

1 Like

I see no reason we couldn’t increase this to something generally safe like 30s or so.

Sure, make a pull request.

I will.

Thanks

tenorio

I mean, am I able to do it ? :slight_smile:

sorry tenorio

You’re welcome to but otherwise I’ll sort it out before the next release if you create a ticket instead. :slight_smile:

1 Like

You can just edit the files and make pull requests straight out of github page. No git involved.

1 Like