New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network latency due to Qt bug when DB Browser is running on macOS #1209

Closed
gee4vee opened this Issue Nov 1, 2017 · 7 comments

Comments

Projects
None yet
5 participants
@gee4vee
Copy link

gee4vee commented Nov 1, 2017

Details for the issue

I was getting some network latency over WIFI on my local network (erratic ~200 ms ping response times on 802.11ac), causing issues in the Synergy app (symless.com). As suggested, I started quitting apps to figure out which could be causing it and I found that it was due to DB Browser. The CEO said that there is a Qt bug that is causing this and provided a code workaround that they implemented that you can use.

// Workaround for QTBUG-40332 "High ping when QNetworkAccessManager is instantiated" 
#if defined (Q_OS_WIN)
    _putenv_s ("QT_BEARER_POLL_TIMEOUT", "-1"); 
#else
    setenv ("QT_BEARER_POLL_TIMEOUT", "-1", 1);
#endif

https://symless.com/forums/topic/4287-choppy-mouse-movement-on-mac-connected-to-pc-server/?do=findComment&comment=19150

Hope this helps.

Useful extra information

I'm opening this issue because:

  • DB4S is crashing
  • DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • Windows: ( version: ___ )
  • Linux: ( distro: ___ )
  • Mac OS: ( _version:10.13.1 )
  • Other: ___

I'm using DB4S version:

  • 3.10.1
  • 3.10.0
  • 3.9.1
  • Other: ___

I have also:

@chrisjlocke

This comment has been minimized.

Copy link
Contributor

chrisjlocke commented Nov 1, 2017

Just a thought, but the issue only affects connections on WiFi, but the workaround is 'global' - it'll nobble the setting whether you're on wireless or not. I assume thats not going to be a major problem? (its only checking for connectivity changes)
If it is, rather than setting the value to -1, maybe increasing it to 15 or 30 minutes? You'll only get a spike every half hour which is better than every 10 seconds.

@gee4vee

This comment has been minimized.

Copy link
Author

gee4vee commented Nov 1, 2017

Don’t think it should be an issue. I’m told that this is what the Symless folks did to fix it in their Synergy app. But if necessary 30 mins is reasonable.

@chrisjlocke

This comment has been minimized.

Copy link
Contributor

chrisjlocke commented Nov 1, 2017

No, I was just thinking out loud. If off is good, it gets my vote. I primarily use DB4S wirelessly at home, but wired at work. Never really had an issue, but don't use the network that 'closely'... its usually 'good enough'.... ;)

MKleusberg added a commit that referenced this issue Nov 18, 2017

@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Nov 18, 2017

Thanks for pointing this out, @gee4vee. I never would have guessed that there is a problem like this 😉 I've just pushed a fix for this. Can you check if it's now working better for you using one of the next nightly builds?

By the way, I don't set the timer to -1 now because that prints an irritating warning to the console whenever you start the application. Instead I'm setting it to INT_MAX which should give you around 596 hours on most systems between each bad ping value 😉

It definitely doesn't seem like the right approach but likely it's also the only thing we can do... If anybody notices any side effects of this, please point them out.

@gee4vee

This comment has been minimized.

Copy link
Author

gee4vee commented Nov 29, 2017

Got the nightly just now and the latency is gone. 👍 👊

@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Nov 29, 2017

Awesome 😄 Thanks for testing 👍

@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Feb 16, 2018

Interestingly, it seems like the Qt team are looking into a more proper solution finally:

    https://bugreports.qt.io/browse/QTBUG-65586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment