Lambda functions running on same instance causes various requests to timeout

0

Hi, I created a function to edit videos in lambda function using ffmpeg. I edit the video using child process to gain kernel access in javascript, and editing a video usually takes around 3-4 minutes of time.

Now if two requests spawn simultaneously(within an interval of 2 minutes) both of those requests get into the same instance of lambda and thus one of the request has to stall resulting in timeout of the lambda function without the editing actually being started.

Thus I am being billed for the same lambda function resources twice, and moreover it is also hindering my editing pipeline by getting timed out due to both requests sharing the same resource.

How is this the desired behavior of the lambda function? How do I change the settings to initiate a new request on a separate instance

Kushal
質問済み 1年前315ビュー
3回答
0

If your Lambda function is processing two requests at once they are completely separate instances in separate containers that have no relationship with each other.

Any interaction you're seeing between these two instances would be due to some external resource (outside of Lambda) that both are using.

エキスパート
回答済み 1年前
0

There are logs of several instances in the same log group. Correct me if I am wrong, but I believe the logs are grouped according to the container the lambda function is running in. If this is not the case, then on what basis does one log group contain logs of multiple instances

Kushal
回答済み 1年前
0

A log group is created for the defined lambda function. Each container will have its own log stream in the log group. So if two instances are running they will be in different containers and so in different log streams, but the same log group.

エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ