Add 'grace time' behavior to Sidekiq MemoryKiller
The previous iteration of the memory killer did not give 'large'
jobs much of a chance to finish. This caused them to come back after
each restart, leading to another memory-induced shutdown. By adding
some 'grace time' between the moment we detect a memory peak and
the moment we start shutting down, we hope to give Sidekiq a chance
to get whatever causes its memory to grow 'out of its system'.
See merge request !1313
ProjectWiki.new() creates a new wiki git repository, so any tries
to bare clone a bundle fail. With this patch we remove the newly
created wiki.git before restoring from the backup bundle.
When enabled, this middleware allows Sidekiq to detect that its RSS has
exceeded a maximum value, triggering a graceful shutdown. This
middleware should be combined with external process supervision that
will restart Sidekiq after the graceful shutdown, such as Runit.
Before this it would fail because git hooks automatically prepend
things to the path, which can lead the wrong Ruby version to be called
in which dependencies are not installed.
To make sure that this is correct, the forked_merge_requests commented
out test that depends on this change was uncommented.
For that test to pass, it is also necessary to setup the mock server
on port 3001 under test_env.rb.
If a project is being restored, but there is no bundle file, the project was
empty when it was backed up. In this case, just use git init --base to create a
new bare repository.
In e23a26a (and later 1bc9936) the API for Gitlab::LDAP::Adapter was
changed. I assume this rake task was an oversight in the refactoring of
the changed class.
While being on it, I noticed that already blocked users cannot be
blocked again.
Don't enable IPv4 *only* on nginx.
I came across this issue when initially setting up gitlab and fixed it locally. Today, helping someone else set up their own instance, I came across this issue again:
The sample nginx configuration files disable IPv6 by default, making the server inaccesible unless the remote node has native IPv4. IPv4->IPv6 transition mechanisms don't help if the server have proper IPv6 DNS records in-place, which was the case for both of my servers.
This branch enables IPv4 and IPv6 by default. Older servers with no external IPv6 connectivity will not fail since they'll have a local-link IPv6 address to bind to anyway.
See merge request !231