Problem with high latency in Workspace
Hi everyone,
I'm experiencing high latency in my workspace and I'm looking for ways to reduce it. Could anyone provide some insights or suggestions on why this might be happening and how I can improve the performance?
Thank you!
13 Replies
<#1335955405171331152>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
can you share the output of
coder ping <workspace-name>
?I am using a VM to run coder
This is the Output:
preferred DERP region: 999 (Coder Embedded Relay)
✔ sent local data to Coder networking coordinator
✔ received remote agent data from Coder networking coordinator
preferred DERP region: 999 (Coder Embedded Relay)
endpoints: 212.227.34.98:33082, 172.17.0.2:33082
✔ Wireguard handshake 0s ago
pong from test123 p2p via 172.17.0.2:33082 in 0s
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 0s
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 0s
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
pong from test123 p2p via 172.17.0.2:33082 in 1ms
^Cpong from test123 p2p via 172.17.0.2:33082 in 1ms
✔ You are connected directly (p2p), over a private network
-------------------------------------------------------------------------
WORKSPACE TOTAL SUCCESSFUL MIN AVG MAX VARIANCE
test123 22 22 119.195µs 717.035µs 914.422µs 61ns
test123 22 22 119.195µs 717.035µs 914.422µs 61ns
i just checked the output when i got the tunnel*s access URL and saw that the used tunnel is one in the US East Pittsburgh is there a way to avoid getting a tunnel so far away? ( I am located in Europe)
To understand how i want to operate coder. I am following the doc from this blog post: https://coder.com/blog/run-coder-in-a-self-hosted-homelab
Coder
Run Coder in a self-hosted homelab
Run Coder in a self-hosted homelab with Docker. Discover how to manage secure, isolated workspaces for development on modest hardware. Learn more now!
hello @valon, have you figured this out?
you'll want to define a
CODER_ACCESS_URL
and CODER_WILDCARD_ACCESS_URL
to avoid going through our try.coder.app
proxyHey @Phorcys , i am trying this right now but my plan is to use the ip from my VM as the access URL, but its not quite working out that way, because i cant seem to reach the site that way. I will try to find a way to get it working like that and then report if it changed something about the latency.
Ok so it didn't work on my VM, so I tried it with my own device, and it worked but when I start the code server I get the error message that the workbench failed to connect to the server. Any help on how I can fix that?
This is the error message i receive

this makes sense, if you use an IP as the access URL then it'll try to reach an IP's subdomain, which isn't possible
could you share your env variables (redacted)?
sorry for the late answer these are my env variables:
CODER_ACCESS_URL=http://(THE IP):3001
CODER_WILDCARD_ACCESS_URL=*.(THE IP):3001
CODER_HTTP_ADDRESS=0.0.0.0:3001
CODER_PG_CONNECTION_URL=
CODER_TLS_CERT_FILE=
CODER_TLS_ENABLE=
CODER_TLS_KEY_FILE=
i also got it to work on the vm now i just got to fix the issue above with the code-server
The env variables are straight out of the coder.env file
oh yeah this is the issue
so, you can't do subdomains on an IP address, that would result in an invalid URL
this is why it's causing issues
you'll either have to move to a domain instead of an IP or not use wildcard
coder_app
s and port-forwardingThanks for the quick answer I will try that
Oh ok it works now without the wildcard URL. Thank you very much for the help
sounds good, closing the issue since you got it figured out :-)
@Phorcys closed the thread.