Why does Greengrass IPC create so many open file descriptors?

0

I am using Greengrass IPC for components to communicate. I fire off a message every 5 seconds. However, it seems that this begins to fail with the error: RuntimeError: 45 (AWS_ERROR_MAX_FDS_EXCEEDED): The maximum number of fds has been exceeded..

I notice that before I start my component and I run the command lsof | wc -l, it shows about 41030 open file descriptors. But when I start my component, the number steadily climbs until it exceeds 1048576 which is the number I found by running the command ulimit -n It only takes a few minutes before it reaches the maximum number and produces that error.

Is there a leak or something in the IPC client?

profile picture
질문됨 8달 전204회 조회
1개 답변
2
수락된 답변

Hi Ken,

It sounds like you're maybe creating a new client to handle each publish request, is that right? You should only create one IPC client and then keep using that client for all requests. See the best practices here: https://docs.aws.amazon.com/greengrass/v2/developerguide/interprocess-communication.html#ipc-best-practices.

AWS
전문가
답변함 8달 전
profile pictureAWS
전문가
Greg_B
검토됨 8달 전
profile pictureAWS
전문가
검토됨 8달 전
  • Ugh.. that's EXACTLY what was happening. Thanks for the tip!

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

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

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

관련 콘텐츠