aws-toolkit-jetbrains icon indicating copy to clipboard operation
aws-toolkit-jetbrains copied to clipboard

Unexpected timeout when running remote lambda

Open Birowsky opened this issue 4 years ago • 9 comments

Describe the bug Getting timeout error after ~90 seconds when running lambda configured at 15 minutes: "Error invoking Lambda: Unable to execute HTTP request: Read timed out"

To reproduce Run a lambda configured with a 15min timeout. image

Expected behavior Should not timeout before its time.

Your Environment

  • OS: Mac 10.15.5
  • JetBrains product: WebStorm
  • JetBrains product version: 2020.1.2
  • AWS Toolkit version: 1.16-201

image

Birowsky avatar Jul 06 '20 20:07 Birowsky

Is this running a remote lambda?

abrooksv avatar Jul 06 '20 20:07 abrooksv

Is this running a remote lambda?

Yessir.

Birowsky avatar Jul 06 '20 20:07 Birowsky

Thanks for clarifying, it looks like we don't override the SDK default timeouts when we invoke the Lambda. This max timeout should be increased for only these calls using the overrideConfiguration.

abrooksv avatar Jul 06 '20 20:07 abrooksv

@abrooksv If you could please clarify.. where exactly can I utilize overrideConfiguration?

Birowsky avatar Jul 06 '20 20:07 Birowsky

Sorry, that was a note for us. Its an API instead of the Java SDK

abrooksv avatar Jul 06 '20 20:07 abrooksv

I dug into this some more, the HTTP timeout is stored at the HTTP Client layer of the SDK and it can't be set per request.

We share this HTTP client across the the entire IDE to save on resources so I am hesitant to change it to be so long since it affects everything.

abrooksv avatar Aug 19 '20 20:08 abrooksv

Is there a way to configure the shared HTTP client which you use across the entire IDE? That way I can temporarily change this configuration while working on my lambda code, and later on decrease it to some sane value like 30 seconds (which I believe is the default)

milanaleksic avatar Nov 18 '20 08:11 milanaleksic

Is there a way to configure the shared HTTP client which you use across the entire IDE? That way I can temporarily change this configuration while working on my lambda code, and later on decrease it to some sane value like 30 seconds (which I believe is the default)

No, there is not today.

abrooksv avatar Nov 18 '20 17:11 abrooksv

Is there any update on this issue? I'm getting a default timeout even though the function is set to a longer timeout. As a result, it runs fine from AWS console, but not from Pycharm IDE.

ChrisMc9 avatar Nov 15 '21 22:11 ChrisMc9