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
feita há um ano314 visualizações
3 Respostas
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.

ESPECIALISTA
respondido há um ano
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
respondido há um ano
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.

ESPECIALISTA
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas