azure-docs icon indicating copy to clipboard operation
azure-docs copied to clipboard

TCP connections limited to 1024 for Linux Azure Container Instace / ACI?

Open horup opened this issue 3 years ago • 3 comments

I am currently testing EMQX, an MQTT broker, which I would like to deploy as a Docker container in Azure. I have tried to deploy EMQX as an Linux Azure Container / ACI and have managed to get this working fine.

however, doing load tests, my container crashes when 1024 MQTT clients are connected.

I have deployed the same EMQX container locally on my PC, where I can easily achieve 10.000 connections to the container.

my conclusion is that there seems to be a limit on the number of open TCP connections which prevents me from connecting more than 1024 MQTT clients to my broker.

is this limit a hard limit or can i raise the limit?

i believe it might be related to max open file descriptors being 1024, but can I raise this?

for docker on desktop machine I would use the ulimit parameter to raise these limits, but do anything exist for ACI?

horup avatar Dec 09 '22 08:12 horup

@horup It would be great if you could add a link to the documentation you are following for these steps? This would help us redirect the issue to the appropriate team. Thanks!!

YashikaTyagii avatar Dec 09 '22 16:12 YashikaTyagii

@YashikaTyagi-MSFT

For a linux container, each TCP connection entails an open file, meaning that TCP connections are limited by the max number of open files on the host system.

For docker, there exist an --ulimit parameter that can raise the maximum number of open files for a given container. see this post from stackoverflow: https://stackoverflow.com/questions/24318543/how-to-set-ulimit-file-descriptor-on-docker-container-the-image-tag-is-phusion this I have tested locally on my dev PC and it works,.

but I need a similar configuration for ACI, i.e. somehow be able to raise the limit for a running container.

I have not been able to figure out how to do this, is this possible with ACI?

horup avatar Dec 12 '22 14:12 horup

@horup Can you provide Microsoft doc link you are following these steps. So i can be able to assist you query

AjayBathini-MSFT avatar Dec 14 '22 07:12 AjayBathini-MSFT

@horup

Since this issue isn't directly related to improving our docs, and to gain a better understanding of your issue, I'd recommend working closer with our support team via an [Azure support request] (https://docs.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request). Or you can leverage our Q&A forum by posting your issue there so our community, and MVPs can further assist you in troubleshooting this issue or finding potential workarounds. [Teams Q&A forum] (https://docs.microsoft.com/en-us/answers/topics/46488/office-teams-windows-itpro.html) for technical questions about the configuration and administration of Microsoft Teams on Windows.

AjayBathini-MSFT avatar Dec 15 '22 04:12 AjayBathini-MSFT