Hi there,
While migrating my scripts to PythonAnywhere I'm trying to solve an issue regarding UDP connections. I constantly have time-outs while connecting to an external servers via UDP. For example:
[2024-04-01 13:32:51,104] DEBUG in scraper: Scraping udp://....lu:80/announce for 72 hashes
[2024-04-01 13:32:56,112] DEBUG in scraper: udp://....lu:80/announce timed out, skipped
The same Python code works fine on my previous hosting and locally.
I understand that running a server that accepts incoming UDP connections are not supported here, but I'm doing the opposite. So I'm wondering if outbound UDP socket connections are not supported at all on PythoAnywhere. This would be very unfortunate. ;(
I'm using the Python socket
module to initiate the connection:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.settimeout(UDP_TIMEOUT)
conn = (socket.gethostbyname(parsed_tracker.hostname), parsed_tracker.port)
...
Thanks for any information!