Menu

My Container Reported 128 KiB and Passed a 1.5 MB Argument List
πŸ“°

My Container Reported 128 KiB and Passed a 1.5 MB Argument List

DEV Community: dockerΒ·Mustafa ERBAYΒ·18 days ago
#m2V4ls5J
#devtodocker#devto#dev#stack#budget
Reading 0:00
15s threshold

My blog server runs Alpine containers that share the host's kernel. Their stack rlimit is identical to the host's: ulimit -s reports 8192 KiB. Ask getconf ARG_MAX in the host shell and the answer is 2,097,152. Ask the same question inside the container and the answer is 131,072. A sixteenfold gap, on one machine, in the same second.

The shortest way to find out which number is true is to try to falsify both. Inside the container, a call to /bin/true with a single 200,000-byte argument came back with Argument list too long . Then 1,500 arguments of 1,000 bytes each β€” 1.5 MB in total, eleven times the reported limit β€” went to the same place and ran without complaint. So the number the container reports is too generous in one direction and too stingy in the other. Both can be wrong at once, because there is no single limit here.

This article digs into where that number comes from, who actually computes the budget, and where your own repository sits inside it.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.