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
질문됨 일 년 전314회 조회
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.

전문가
답변함 일 년 전
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
답변함 일 년 전
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.

전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠