Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The AWS Lambda returns "Error: connect ETIMEDOUT **.****.***.***:443" #105

Open
acabun opened this issue Aug 18, 2021 · 0 comments
Open

Comments

@acabun
Copy link

acabun commented Aug 18, 2021

I have to services, Admin Panel(Laravel) и Online Shop(Woocommerce). TH relation between these to services was realized with "AWS Lambda"

when I try to send an updating product request from my ADmin panel to online shop, time to time the lambda couldn't connect to the Woocomerce API.
On time when the system is not updating the product, lambda returns the error "Error: connect ETIMEDOUT"

I originally thought that the Wordpress didn't have enought time for updating process. And decided to increase the lambda's timeout (60000 ms).
But it didn't help. I still found the ETIMEDOUT errors in logs.

By the way, the time period between sending the updating request to woocommerce and showing an error is 2 min.
If I right understand, the lambda had enought time for getting the answer from woocommerce.

Another strage thing. According the lambda's logs, on time when lambda got an error, the woocommerce API was available. It seems like something disconnects the internet on time when lambda is sending the request.

My question is, why lambda cannot send to woocommerce API the reuqest. Why it happens time to time ?

P.S. Below I added the example of lambda's logs.


The log on starting sending the uptading request.

2021-08-14T18:23:48.692Z b228455b-45a8-5cbf-8160-1cc INFO Inside edit Online List {
status: '1',


is_delete: 0,
name: 'Omega Speedmaster Moonwatch Chronograph 42mm ',
price_on_request: 0,
on_sale: 0
}

The log with error.

2021-08-14T18:25:58.299Z b228455b-45a8-5cbf-8aae6 INFO WooCommerce editOnlineStock err::: { Error: connect ETIMEDOUT ...:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '
...',
port: 443,
config:
{ url:
'https://domain.com/wp-json/wc/v3/products/
',
method: 'put',
params: {},
data:
'{"name":"Omega Speedmaster Moonwatch Chronograph 42mm ","type":"simple"
',
headers:
{ Accept: 'application/json',
'Content-Type': 'application/json;charset=utf-8',
'User-Agent': 'WooCommerce REST API - JS Client/1.0.1',
'Content-Length': 681 },
auth:
{ username: 'ck_
',
password: 'cs_
********' },
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 60000,
adapter: [Function: httpAdapter],
responseType: 'json',
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
****************************

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant