question

Pramod-5292 avatar image
0 Votes"
Pramod-5292 asked RushabhDudhe-0717 published

NGINX in containerized deployement retruns error "getrlimit(RLIMIT_NOFILE): 1048576:1048576"

When we moved to Azure for testing our deployments, NGINX returns error which seems to be OS level error.
Same deployment works well on other cloud platforms, also the OS version is maintained uniform across all our testing cloud platforms.

OS version: Linux version 4.19.0-18-cloud-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.208-1 (2021-09-29)

Docker container error:
2022/03/04 14:42:58 [notice] 14#14: using the "epoll" event method
2022/03/04 14:42:58 [notice] 14#14: nginx/1.21.6
2022/03/04 14:42:58 [notice] 14#14: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
2022/03/04 14:42:58 [notice] 14#14: OS: Linux 4.19.0-18-cloud-amd64
2022/03/04 14:42:58 [notice] 14#14: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2022/03/04 14:42:58 [notice] 14#14: start worker processes
2022/03/04 14:42:58 [notice] 14#14: start worker process 15
2022/03/04 14:42:58 [notice] 14#14: start worker process 16

PLease advise.

azure-container-registry
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

use -d to run daemonized version.
use the flag just before the <repository/image>

0 Votes 0 ·

1 Answer

ManuPhilip avatar image
0 Votes"
ManuPhilip answered ManuPhilip commented

Looks like the issue is NGINX tries to create a pid in a read-only file system. Try running the container by pointing tmpfs manually as --tmpfs /var/run/
Hope, this helps !


--please don't forget to upvote and Accept as answer if the reply is helpful--

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ManuPhilip -

Tried it, That did not work!

0 Votes 0 ·

@ManuPhilip -

Tried it, That did not work!

0 Votes 0 ·

Please post the complete message printed

0 Votes 0 ·