-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
"chown -R sentry /var/lib/sentry/files" from entrypoint.sh takes a long time #239
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
Comments
Sounds like a good suggestion, what do you think @mattrobenolt? Also, would you be willing to submit a PR for this @stumbaumr? |
Alternative is to just drop the |
Ok, so kinda my source of truth for this stuff is Postgres. Postgres manages a ton of files in its data directory and it does exactly this as well. https://github.com/docker-library/postgres/blob/master/12/docker-entrypoint.sh#L34 |
MySQL as well. https://github.com/docker-library/mysql/blob/master/8.0/docker-entrypoint.sh#L90 So I’d be curious why this is more problematic for us than a database who most likely has more files than we do. |
Use case: We operate data filesystems on NFS mounts on a SSD based appliance. Throughput/Availabilty/Snapshotting is great, but latency is in some cases a problem. Chowning on a filesystem with many files like this takes time - and since the owner is already sentry it is not necessary. And we are talking currently about 15 Minutes.... |
Eh, mounting a volume from an NFS mount is not a great idea I guess. I mean if your suggestion makes this better, I'm not opposed to it as long as @mattrobenolt is also okay. |
Ok, so checking through the docker community, it does seem like they are trending towards making this change, it can be seen in here for Postgres rolled up with other changes: docker-library/postgres#496 They're changing to using So I'm ok with this. I do think NFS is not good, but I don't think it wouldn't work. It's probably fine for most use cases. |
@stumbaumr so, open to PR's over at https://github.com/getsentry/docker-sentry :) |
Please do not tell NetApp that operating Systems on NFS is a bad idea. I think a major portion of their business model relies on that... |
@stumbaumr sorry, didn't want to invalidate or judge anything. NFS itself tends to be slower on some I/O operations, that's why we kind of frowned upon it. Great if it works for you :) |
As discussed in getsentry/self-hosted#239 with some setups this chown takes over 20 minutes.
Already fixed in getsentry/docker-sentry#200 |
Thanks @stumbaumr! |
I have 26712 under NFS storage
and it's still take ~3 min to start sentry container :( |
@azhurbilo sorry to hear that. Which tag are you on for the docker image? |
9.1.2 image but I override entrypoint to this one https://github.com/getsentry/docker-sentry/blob/master/9.1/docker-entrypoint.sh |
@azhurbilo and how do you do that override? |
|
just for workaround start using -maxdepth 1
hope, it doesn't broke smth :) |
Pretty sure this directory should only have direct descendants so not sure why adding |
So, for me the startup currently takes about 4 Minutes and I am fine with that.
This is a SSD-only NetApp attached with 10GBit. |
* different approach to editing permissions of docker volumes
Hi,
if there are some more files in /var/lib/sentry/files it really takes a long time to start up.
Maybe better to only change the permissions if necessary instead of just writing hard to the filesystem:
The text was updated successfully, but these errors were encountered: