Help with Api methods in django

tengo una aplicacion en django que utiliza muchas peticiones y webhooks mediante api de woocommerce. algunos dias me tira este error File "/opt/venv/lib/python3.11/site-packages/requests/adapters.py", line 553, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='calzadospaola.cl', port=443): Max retries exceeded with url: /wp-json/wc/v3/orders?search=&per_page=10&page=1&fields=id%2Cstatus%2Cbilling%2Cdate_created%2Ccustomer_note (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f810bd74d90>, 'Connection to calzadospaola.cl timed out. (connect timeout=10)')) Lo mas raro es que cuando ejecuto este mismo metodo en mi app local funciona sin problemas, que puedo hacer?
12 Replies
Percy
Percy3mo ago
Project ID: N/A
javieraraya5573
javieraraya55733mo ago
N/A
Brody
Brody3mo ago
please use English if possible
javieraraya5573
javieraraya55733mo ago
I have an application in Django that uses many requests and webhooks through the woocommerce api. some days I get this error File "/opt/venv/lib/python3.11/site-packages/requests/adapters.py", line 553, in submission increase ConnectTimeout(e, request = request) request.exceptions.ConnectTimeout: HTTPSConnectionPool(host='calzadospaola.cl', port=443): Maximum number of retries exceeded with url: /wp-json/wc/v3/orders?search=&per_page=10&page=1&fields=id% 2Cstatus% 2Cbilling%2Cdate_created%2Ccustomer_note (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSOconnection object at 0x7f810bd74d90>, 'Connection to ropaspaola.cl. timed out (connection timeout=10)')) The strangest thing is that when I run this same method in my local application it works without problems, what can I do?
Brody
Brody3mo ago
looks like it's possible WooCommerce is blocking your connection when deployed to railway
javieraraya5573
javieraraya55733mo ago
yes
Brody
Brody3mo ago
you would need to get in contact with them, as this wouldn't be related to railway's platform or product
javieraraya5573
javieraraya55733mo ago
mmm
Brody
Brody3mo ago
I understand how it may look at the surface, but I assure you, railway does not block any outgoing requests for any reason.
javieraraya5573
javieraraya55733mo ago
but it has nothing to do with rail server, any possibility to adjust the wait time on the server
Brody
Brody3mo ago
that would be something you would need to do in your code
javieraraya5573
javieraraya55733mo ago
ok i try to find out thank u