# Does long (~250 ms) network latency break plotting over ssh?

**URL:** <https://discourse.julialang.org/t/does-long-250-ms-network-latency-break-plotting-over-ssh/126722>\
**Category:** General Usage\
**Tags:** plotting, cloud-computing, ssh\
**Created:** [March 8, 2025, 11:08pm UTC](https://discourse.julialang.org/t/does-long-250-ms-network-latency-break-plotting-over-ssh/126722 "2025-03-08T23:08:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tetrakai](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Post date:** [March 8, 2025, 11:08pm UTC](https://discourse.julialang.org/t/does-long-250-ms-network-latency-break-plotting-over-ssh/126722/1 "2025-03-08T23:08:25Z")

</div>

I am trying out AWS and came across an issue with plots. They worked fine when the server was in the same country, but when I chose a cheaper one in a different region began getting this:

```julia
connect: Connection refused
GKS: can't connect to GKS socket application

GKS: Open failed in routine OPEN_WS
GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE_WS
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
[...]

```

It doesn’t occur all the time, but even for simple `scatter(1:10, 1:10)` plots it can still happen. However, if at the beginning of the session I get a simple plot to work, then my more complicated later plots are also fine.

This is likely the same issue (got no response):

> [@Plotting on remote server](https://discourse.julialang.org/t/plotting-on-remote-server/82968):
>
> I am runnging my code on supercomputer server and I always receive this error Connection refused GKS: can't connect to GKS socket application GKS: Open failed in routine OPEN\_WS GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE\_WS qt.qpa.xcb: could not connect to display localhost:11.0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be ini…

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [March 8, 2025, 11:19pm UTC](https://discourse.julialang.org/t/does-long-250-ms-network-latency-break-plotting-over-ssh/126722/2 "2025-03-08T23:19:01Z")

</div>

I don’t think I’m answering your question, but I’ve been using Julia through the VSCode remote server and it has been a great experience even with a slow internet connection (plotting included).

---

<div class="post-metadata">

**Author:** ![Tetrakai](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Post date:** [March 8, 2025, 11:33pm UTC](https://discourse.julialang.org/t/does-long-250-ms-network-latency-break-plotting-over-ssh/126722/3 "2025-03-08T23:33:05Z")

</div>

Not sure if VSCode would matter, but I am not using it. This is typing/pasting code into the REPL, then the plot pops up in a GKS QtTerm window.

Also, this is using the StatsPlots package. Both devices are running linux. Maybe it is something else like the AWS image got corrupted when copied to the new region, I haven’t tried installing julia from scratch yet.

But some kind of latency issue seems plausible.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [March 8, 2025, 11:44pm UTC](https://discourse.julialang.org/t/does-long-250-ms-network-latency-break-plotting-over-ssh/126722/4 "2025-03-08T23:44:51Z")

</div>

Maybe it does help, I don’t know how is the machinery for displaying a plot, but it does not depend on communicating a Qt window through the network (which by the way never works in these slow connections I mentioned).
