How much memory does sentry really need?
With a hard limit of 4000 I can't even install it on a machine with 4gb memory because the machine in my case shows just 3888. The next step at most providers would be 8gb, but I think that is not what you intended with 4000?
https://github.com/getsentry/onpremise/blob/54a20969a62675cb3e5b8a976c573f86806a081b/install.sh#L28