Skip to content

replaced chown with find -not -user -execdir chown #3617

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

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

woodmichl
Copy link
Contributor

chown -R tries to chown all files. find -not -user -execdir only chowns files not owned by PUID.
This should fix #2991 especially on high io delay systems

chown -R tries to chown all files. find -not -user -execdir only chowns files not owned by PUID
@woodmichl woodmichl changed the title replaxed chown with find -not -user -execdir chown replaced chown with find -not -user -execdir chown Mar 10, 2024
@nginxproxymanagerci
Copy link

Docker Image for build 1 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-3617

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@woodmichl
Copy link
Contributor Author

This makes a huge difference with high io delay systems.
NPM started with the old image:

docker logs nginx-proxy-manager-app-1 --timestamps -f
2024-03-10T01:43:48.531315056Z ❯ Configuring npm user ...
2024-03-10T01:44:18.626856722Z useradd warning: npm's uid 0 outside of the UID_MIN 1000 and UID_MAX 60000 range.
2024-03-10T01:44:38.243063441Z ❯ Configuring npm group ...
2024-03-10T01:44:39.602130055Z ❯ Checking paths ...
2024-03-10T01:44:44.379702258Z ❯ Setting ownership ...
2024-03-10T03:51:50.463062606Z ❯ Dynamic resolvers ...

vs NPM started with jc21/nginx-proxy-manager:github-pr-3617:

docker logs nginx-proxy-manager-app-1 --timestamps -f
2024-03-10T01:36:30.059597735Z ❯ Configuring npm user ...
2024-03-10T01:37:02.683703437Z useradd warning: npm's uid 0 outside of the UID_MIN 1000 and UID_MAX 60000 range.
2024-03-10T01:37:28.858989680Z ❯ Configuring npm group ...
2024-03-10T01:37:30.962162157Z ❯ Checking paths ...
2024-03-10T01:37:37.305240596Z ❯ Setting ownership ...
2024-03-10T01:39:08.974547120Z ❯ Dynamic resolvers ...
2024-03-10T01:39:08.983700932Z ❯ IPv6 ...

So as you can see with the new code the "Setting ownership" step took ~1 Minute and 30 seconds while taking >2 hours with the old code

@jc21
Copy link
Member

jc21 commented Apr 19, 2024

Great stuff :)

@jc21 jc21 merged commit 02aefa5 into NginxProxyManager:develop Apr 19, 2024
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

Successfully merging this pull request may close these issues.

Unable to start npm container...
2 participants