I'm not very savvy with this and trying to learn as I go along so bear with me.
I'm running a mini PC media server with a N95 with Debian and a bunch of dockers for media management, and PIA's official utility in Wireguard mode. The system is set up such that PIA will boot up and initialize the wireguard network interface and afterward the dockers will come online and connect to it. I previously tried gluetun in openvpn mode and dealt with similar intermittent slow speed.
The problem: My internet speed is 500/500, but I notice that usually, when I reboot the mini PC, I have terrible connectivity with the VPN connected. Sub 10mbit, sometimes less than 5mbit. To fix it, I use "piactl disconnect" and "piactl connect", then I run a speedtest, and I keep doing this until I get decent bandwidth. It can take upward of 4-5 times.
This seems to happen both with Toronto and Montreal's servers. I'm wondering if I'm doing something wrong.
Not sure where to go from here, whether I need to change a configuration, or whether I need to write a script that'll try to reconnect repeatedly on bootup until the connection is good.