Error 502 in AwsLambda

Hello!

We are trying to transfer to Linode with AWS Lambda.
Most of them succeed but occasionally it returns a 502 error.
The part that sends the error is always the exists part that checks for the existence of the object.

my_bucket.object(key).exists?

Do you know of a way to remedy this error?

Thank you.

1 Reply

In most of the cases it is the issue with timeout. By default, aws lambda has a timeout of 3 seconds. As you also mentioned occasionally it returns a 502 error. Since It might be exceeding the timeout, You get 502 Bad Gateway. To solve this problem, just increase the timeout. Or you can choose a region that is closer to you, but it depends on your location.

To increase the timeout:

  • Go to your lambda
  • Then go to "configurations" and select "general configurations"
  • Click "edit", after which you can change the timeout)

As you are transferring to Linode ,There is no timeout set from our end,You can refer our object storage guide which states our Technical Specifications and Considerations to know more from the Linode side, but as i can think Linode part should not cause any issue with with this "502 error" that that you are getting sometimes

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct