Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot start container anymore: line 32: /bin/chmod: Argument list too long #148

Open
smoebody opened this issue Jun 7, 2021 · 1 comment

Comments

@smoebody
Copy link

smoebody commented Jun 7, 2021

After running for a while with a large database i cannot start the container anymore. The entrypoint-script fails with

Initializing datadir...
/etc/docker-postgresql/functions: line 32: /bin/chmod: Argument list too long

counting the files shows

find ${PG_DATADIR} -type f | wc -l
42301

is this unusual much?

@kkimurak
Copy link
Contributor

$ docker run --rm sameersbn/postgresql:12-20200524 xargs --show-limits
Your environment variables take up 390 bytes
POSIX upper limit on argument length (this system): 2094714
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2094324
Size of command buffer we are actually using: 131072
Maximum parallelism (--max-procs must be no greater): 2147483647

so 42301 files are too much to be processed by single command, I think.
I have submitted PR to fix this. see #152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants