Outbound connection to PythonAnywhere failing from free Render service

Hi, I’m running a Python Discord bot on Render (free web service), and it needs to connect to my web backend hosted on PythonAnywhere.

Yesterday everything worked fine, but today all outbound requests from my Render service to https://myaccount.pythonanywhere.com fail with:

Failed to log in to web app: Cannot connect to host myaccount.pythonanywhere.com:443 ssl:default [Connect call failed ('35.173.xx.xx', 443)]

I added a diagnostic in my code that shows DNS resolves correctly (to AWS IP 35.173.xx.xx) but the TCP/TLS handshake fails with [Errno 111] Connect call failed.

Things I’ve tried:

  • Verified the domain works fine from my local machine (curl/openssl succeed).
  • Verified the service code is correct (aiohttp, my PythonAnywhere URL, etc.).
  • Tested with longer timeouts and forced IPv4.

So it looks like the problem is outbound networking from Render free tier → PythonAnywhere AWS IPs.

My questions:

  1. Are there outbound restrictions on free services that could block certain AWS IP ranges?
  2. Would upgrading to a paid plan guarantee stable outbound connectivity?
  3. Is using Render’s static outbound IPs (via the “Connect → Outbound” tab) the right approach if I want to whitelist at the destination?
  4. Is there any recommended workaround (proxy, region change, etc.) for free tier?

Any help or confirmation would be greatly appreciated. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.