[Spice-devel] gtk client side timeouts

Frediano Ziglio fziglio at redhat.com
Tue Apr 30 19:47:26 UTC 2019


> 
> Hi,
> 
> On 3/10/17 11:01 AM, Christophe Fergeau wrote:
> > On Fri, Mar 10, 2017 at 10:49:54AM -0600, Jeremy White wrote:
> >> Hey all,
> >>
> >> We've got an issue with a remote viewer kiosk.  That is, in our normal
> >> mode of operation, if something goes wrong with a client connection
> >> (e.g. the sessions is killed, server restarted normally), the kiosk will
> >> exit on disconnect, and we get a chance to retry the connection, or
> >> present the user with a 'server down' style message.
> >>
> >> But in the case of a serious network problem or a server hard power
> >> cycle (i.e. no TCP FIN packets can flow), our end user behavior is not
> >> ideal - the kiosk appears to hang solid, requiring a power cycle.
> >>
> >> That's because we've got the stock keepalive timeouts, or about 2 hours
> >> and 11 minutes, before the client sees the disconnect.
> >>
> >> Now this is a relatively rare occurrence, and arguably a minor nuisance,
> >> but I've been asked to see what it would take to improve the situation.
> >>
> >> I looked for past discussions on spice-devel; I only readily found
> >> discussion of the keepalive parameters on the server side, and it looks
> >> like we take the idle timer down to 10 minutes now, from 2 hours.  I
> >> didn't find discussion of something similar client side.
> >>
> >> Have we considered tuning them on the spice-gtk client side?
> >>
> >> The attached patch applies a roughly 75 second timeout for me; is this
> >> something that would be viable to add to the gtk client, even if only as
> >> an option?
> > 
> > Ah, I've coincidentally been looking at this this week too, not with the
> > same goal in mind though, my problem is SPICE connection sometimes
> > getting dropped if idle for too long. But the current answer is also
> > tweaking TCP keepalives.
> > Definitely no objection having some form of keepalive client sides,
> > though your proposed change is not going to work for the Windows client.
> > 
> > I've made some good progress on patches to add both Windows/linux
> > support to glib, but need to finish them up ;)
> 
> Ping?  This problem persists, and the patch I sent then:
>  
> https://lists.freedesktop.org/archives/spice-devel/attachments/20170310/6938c6dc/attachment.diff
> 
> has been working for us for a number of years without any unexpected
> consequences.
> 
> Could I submit this patch and we remove it when there is a better
> solution that also supports Windows?
> 
> Cheers,
> 
> Jeremy

I think it was just a mistake. We have similar code in SPICE server and usbredir,
just probably got forgotten.
It needs only some portability enhancement (first would be Unix, then Windows).
Can you send a proper patch with commit message?

Frediano


More information about the Spice-devel mailing list