ST is checking for releases way too frequently

Hi

I have been using Arm version on Android (via Termux) for a while. One thing that seems excessive is that it seems like Syncthing is checking for releases every couple minutes even when the wifi is down or when there is connection issues.

Would not it make sense if the release check is done only one or two times a day at most especially on arm builds given that most of these arm devices are low powered or battery operated? Why create network activity if it is not needed that much?

Releases are looked for every 24 hours, and when the GUI is opened (in order to show the upgrade prompt button).

Well that is not what my log is saying. I will try to paste the log here when Iget a chance.

Ok

Here is the log. I see this line every couple minutes in my log

18:42:10 VERBOSE: External port mapping changed; new port is 61479.
[HD6OA] 18:42:10 INFO: Couldn’t fetch release information: Get https://api.github.com/repos/syncthing/syncthing/releases?per_page=30: dial tcp: lookup +api.github.com on [::1]:53: read udp [::1]:56929->[::1]:53: read: connection refused
[HD6OA] 18:42:10 INFO: Automatic upgrade: no version to select
[HD6OA] 18:42:10 INFO: Couldn’t fetch release information: Get https://api.github.com/repos/syncthing/syncthing/releases?per_page=30: dial tcp: lookup +api.github.com on [::1]:53: read udp [::1]:56929->[::1]:53: read: connection refused

Ah. If the connection fails due to something that looks like a temporary network error it is retried in a minute, yes. In this case it looks like it’s failing to talk to the DNS server on localhost.

Yes sure but would not it nice if there is a setting so that user can change that behavior. According to the log above ST gets frantic when there is a connection issue as you mentioned.

Actually no, I was wrong. It looks like it should wait a full check interval (12 hours) before retrying. Something else is going on here. What is your upgrade interval set to in the config? (autoUpgradeIntervalH)

I think it is the default value. It shows up as 12

I don’t see how that can result in a check more than once every 12 hours, errors or no… But it certainly looks that way from the logs. :confused:

Any more ideas recommendations for this issue?

Provide steps to reproduce it, as it doesn’t happen for me.

Disable network, make it so it can’tt check the releases. This is the only situation I have here.

This is also the arm version running on Android Termux terminal.

HD6OA] 18:33:27 INFO: UPnP parse: unrecognized UPnP device of type urn:schemas-upnp-org:device:InternetGatewayDevice:1
2016/01/02 18:37:44 http: TLS handshake error from 127.0.0.1:39743: remote error: unknown certificate
2016/01/02 18:37:45 http: TLS handshake error from 127.0.0.1:38898: remote error: unknown certificate
2016/01/02 18:37:45 http: TLS handshake error from 127.0.0.1:52128: remote error: unknown certificate
2016/01/02 18:37:45 http: TLS handshake error from 127.0.0.1:47126: remote error: unknown certificate
[HD6OA] 18:37:50 INFO: Couldn’t fetch release information: Get https://api.github.com/repos/syncthing/syncthing/releases?per_page=30: dial tcp: lookup api.github.com on [::1]:53: read udp [::1]:39207->[::1]:53: read: connection refused
[HD6OA] 18:39:35 INFO: Couldn’t fetch release information: Get https://api.github.com/repos/syncthing/syncthing/releases?per_page=30: dial tcp: lookup api.github.com on [::1]:53: read udp [::1]:45326->[::1]:53: read: connection refused
[HD6OA] 18:41:27 INFO: Couldn’t fetch release information: Get https://api.github.com/repos/syncthing/syncthing/releases?per_page=30: dial tcp: lookup api.github.com on [::1]:53: read udp [::1]:46691->[::1]:53: read: connection refused
[HD6OA] 18:43:36 INFO: Couldn’t fetch release information: Get https://api.github.com/repos/syncthing/syncthing/releases?per_page=30: dial tcp: lookup api.github.com on [::1]:53: read udp [::1]:42534->[::1]:53: read: connection refused
[HD6OA] 18:45:25 INFO: Couldn’t fetch release information: Get https://api.github.com/repos/syncthing/syncthing/releases?per_page=30: dial tcp: lookup api.github.com on [::1]:53: read udp [::1]:51093->[::1]:53: read: connection refused
[HD6OA] 18:46:46 INFO: Couldn’t fetch release information: Get https://api.github.com/repos/syncthing/syncthing/releases?per_page=30: dial tcp: lookup api.github.com on [::1]:53: read udp [::1]:45379->[::1]:53: read: connection refused
2016/01/02 18:46:47 http: TLS handshake error from 127.0.0.1:39397: remote error: unknown certificate
2016/01/02 18:46:47 http: TLS handshake error from 127.0.0.1:41337: remote error: unknown certificate
2016/01/02 18:46:47 http: TLS handshake error from 127.0.0.1:51789: remote error: unknown certificate
2016/01/02 18:46:47 http: TLS handshake error from 127.0.0.1:55961: remote error: unknown certificate
[HD6OA] 18:48:53 INFO: Couldn’t fetch release information: Get https://api.github.com/repos/syncthing/syncthing/releases?per_page=30: dial tcp: lookup api.github.com on [::1]:53: read udp [::1]:59436->[::1]:53: read: connection refused
[HD6OA] 18:50:46 INFO: Couldn’t fetch release information: Get https://api.github.com/repos/syncthing/syncthing/releases?per_page=30: dial tcp: lookup api.github.com on [::1]:53: read udp [::1]:59423->[::1]:53: read: connection refused
2016/01/02 18:59:38 http: TLS handshake error from 127.0.0.1:34650: remote error: unknown certificate
2016/01/02 18:59:38 http: TLS handshake error from 127.0.0.1:37962: remote error: unknown certificate
2016/01/02 18:59:38 http: TLS handshake error from 127.0.0.1:51568: remote error: unknown certificate
2016/01/02 18:59:38 http: TLS handshake error from 127.0.0.1:45121: remote error: unknown certificate
[HD6OA] 18:59:42 INFO: Couldn’t fetch release information: Get https://api.github.com/repos/syncthing/syncthing/releases?per_page=30: dial tcp: lookup api.github.com on [::1]:53: read udp [::1]:40730->[::1]:53: read: connection refused
[HD6OA] 19:03:30 INFO: UPnP parse: unrecognized UPnP device of type urn:schemas-upnp-org:device:InternetGatewayDevice:1

It’s failing to connect to your local DNSMASQ server. I think it might try to look up the IP in a few different networks, hence why you see multiple errors.

Fine, but would not it make sense if it stops after a while? It keeps trying very frequently as long as ST is running.

The issue is not that it is failing to query dns server, the issue is that it is doing this every couple minutes.

Those other TLS errors you’re seeing is someone talking to the GUI and failing, due to not liking our certificate. This (the upgrade checks) is for sure an effect of that thing calling /rest/system/upgrade to fetch upgrade information. Our web GUI does it once on first load, but perhaps you’re reloading the page or perhaps the Android app retries upgrade checks on failure. It’s not the automatic upgrade mechanism.

It does it even when Web gui is not running.

Or something else, I have no way of knowing.

I am not using the Addroid app. This is the arm version.

The fact remains. Those entries http: TLS handshake error is someone talking to the REST service, i.e. the GUI or something else.