Many wireguard peers

I encountered a weird situation and am wondering if there’s something I’m doing wrong.

I was trying to deploy my app and couldn’t get WireGuard to work. The fly doctor output was

Testing authentication token... PASSED
Testing flyctl agent... PASSED
Testing local Docker instance... PASSED
Pinging WireGuard gateway (give us a sec)... FAILED
(Error: ping gateway: no response from gateway received)

We can't establish connectivity with WireGuard for your personal organization.

And when trying to deploy with --remote-only, I was told that the connection fails (can’t remember the exact message now). I then ran fly wireguard list and realized I had ~150 entries there like interactive-agent-....-...-457. After deleting some of them, things started working again.

I’m not sure it’s expected to have that many connections there and how it got to that point (I don’t think I did anything weird, mostly just deploying). Just wanted to flag this in case it points to something that should be fixed.


Update: OK, so it looks like I get a new entry in wg list after each deploy. Is that expected and can it cause problems? Should I periodically clean them up?

I encountered the same problem here today (although I didn’t hit any limit to the peers yet). Is it intended that every deploy creates a new entry? Is there some way to automatically clean them up after deploy?