Back

python function connection issues

  • 0
  • Functions
ChicK00o
15 Oct, 2023, 17:15

I am continuously getting HTTPSConnectionPool(host='www.nseindia.com', port=443): Read timed out. Even if i keep the function timeout at 15 mins. The code works fine when run locally.

TL;DR
The user was experiencing connection issues with a Python function. Initially, they tried different methods but were unable to find a solution. However, they later discovered that the website was rejecting requests from outside the country, so they had to use proxies based in India to resolve the issue. They then mentioned something about a load balancer and provided some information about the IP addresses for the website on the cloud and local machine. It is unclear whether they are self-hosting or on the cloud. The user mentioned an error message about a timed out connection and was unable to debug it. The code worked fine when run locally. There is no specific solution mentioned
ChicK00o
15 Oct, 2023, 17:19

execution id : 652c1b525c690c9074be function id :652b513aa586cf8639d5 last error was Unexpected curl error between proxy and executor ID exc3 (110): Operation timed out\nError Code: 500 but unable to debug this.

Drake
15 Oct, 2023, 22:03

Are you self hosting or on cloud?

ChicK00o
16 Oct, 2023, 01:20

on the cloud

ChicK00o
16 Oct, 2023, 01:52

socket.getaddrinfo('www.nseindia.com', 443) on cloud is [[2,1,6,"www.nseindia.com",["104.102.34.161",443]],[2,2,17,"www.nseindia.com",["104.102.34.161",443]]] on local machine is [(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('104.121.247.209', 443)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('104.121.247.209', 443))]

Drake
16 Oct, 2023, 03:12

Do you have some sort of load balancer in front?

ChicK00o
16 Oct, 2023, 04:15

na is seems the website rejects request coming from outside the country, had to put proxies that were based in india for it to work, this is resolved. sorry about the false alarm.

ChicK00o
16 Oct, 2023, 04:15

this is now resolved for me

ChicK00o
16 Oct, 2023, 04:15

but getting a better message somehow would have been better, this was all trial and error

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more