High memory usage/ memory creep (up to 10GB for single user instance)

Hi, I am running 17.1.1-ce as a docker container, pretty basic/standard installation, some modifications such as using an external DB and optimizations suggested in the official documentation but nothing special.

If I leave the container running, without using it AT ALL, like not even a single user logging in, the container ends up eating all of my available memory which can be about 10GB. For example I started the container 24 hours ago , when started it was using about 2.7Gb and it has already crept up to 3.5 Gb. If left alone , again with no usage what so ever, it will end up using all available memory which in my case can be something like 10Gb for the container (out of 18Gb total for the host). I get that for a instance that has a lot of use with many users this would be expected but I have only 1 user that doesn’t even log in.

Is this some type of issue? Surely it cant be expected behavior right? I have tried everything mentioned in the gitlab documentation with no results what so ever. Any reference I find to memory usage on this forum such as this one has no responses and I have searched and searched for the past couple of weeks and am out of ideas and hope and so this is my last resort.

this is my config if it helps (obviously some information changed for privacy but those things don’t matter only included for completeness)

external_url 'https://git.myDomain.com'
gitlab_rails['gitlab_shell_ssh_port'] = 2055
gitlab_rails['time_zone'] = 'America/New_York'
gitlab_rails['display_initial_root_password'] = false
gitlab_rails['store_initial_root_password'] = true
gitlab_rails['initial_root_password'] = "1XXX1"
postgresql['enable'] = false
gitlab_rails['db_adapter'] = 'postgresql'
gitlab_rails['db_encoding'] = 'utf8'
gitlab_rails['db_host'] = 'serviceDB.servers'
gitlab_rails['db_port'] = 5454
gitlab_rails['db_username'] = 'gitlab_worker'
gitlab_rails['db_password'] = '1XXX1'
gitlab_rails['initial_root_password'] = '1XXX1'
gitlab_rails['db_database'] = "gitlabhq_production"
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.provider.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "emailapikey"
gitlab_rails['smtp_password'] = "w=="
gitlab_rails['smtp_domain'] = "myDomain.com"
gitlab_rails['smtp_authentication'] = "plain"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = false
gitlab_rails['smtp_pool'] = false
gitlab_rails['smtp_openssl_verify_mode'] = 'none'
gitlab_rails['gitlab_email_from'] = 'gitlab@myDomain.com'
gitlab_rails['gitlab_email_display_name'] = 'Gitlab'
gitlab_rails['gitlab_email_reply_to'] = 'noreply@myDomain.com'
gitlab_rails['gitlab_email_subject_suffix'] = ''
gitlab_rails['gitlab_default_theme'] = 2
gitlab_rails['trusted_proxies'] = ['192.168.1.2', '192.168.1.3', '192.168.1.4']
gitlab_rails['monitoring_whitelist'] = ['192.168.3.1/32', '192.168.4.1/32', '192.168.5.1/32']
gitlab_rails['incoming_email_enabled'] = true
gitlab_rails['incoming_email_address'] = "gitlab-incoming+%{key}@myDomain.com"
gitlab_rails['incoming_email_email'] = "git@myDomain.com"
gitlab_rails['incoming_email_password'] = "1XXX1"
gitlab_rails['incoming_email_host'] = "provider.com"
gitlab_rails['incoming_email_port'] = 993
gitlab_rails['incoming_email_ssl'] = true
gitlab_rails['incoming_email_start_tls'] = false
gitlab_rails['incoming_email_mailbox_name'] = "inbox"
gitlab_rails['incoming_email_idle_timeout'] = 60
gitlab_rails['incoming_email_log_file'] = "/var/log/gitlab/mailroom/mail_room_json.log"
gitlab_rails['incoming_email_delete_after_delivery'] = true
gitlab_rails['incoming_email_expunge_deleted'] = true
gitlab_rails['lfs_enabled'] = true
gitlab_rails['lfs_storage_path'] = "/var/opt/gitlab/gitlab-rails/shared/lfs-objects"
gitlab_rails['uploads_directory'] = "/var/opt/gitlab/gitlab-rails/uploads"
gitlab_rails['uploads_storage_path'] = "/opt/gitlab/embedded/service/gitlab-rails/public"
gitlab_rails['uploads_base_dir'] = "uploads/-/system"
gitlab_rails['ci_secure_files_enabled'] = true
gitlab_rails['ci_secure_files_storage_path'] = "/var/opt/gitlab/gitlab-rails/shared/ci_secure_files"
gitlab_rails['manage_backup_path'] = true
gitlab_rails['backup_path'] = "/var/opt/gitlab/backups"
gitlab_rails['backup_gitaly_backup_path'] = "/opt/gitlab/embedded/bin/gitaly-backup"
git_data_dirs({"default" => {"path" => "/mnt/nfs-01/git-data"}})
gitlab_rails['shared_path'] = '/var/opt/gitlab/gitlab-rails/shared'
gitlab_rails['encrypted_settings_path'] = '/var/opt/gitlab/gitlab-rails/shared/encrypted_settings'
gitlab_rails['dir'] = "/var/opt/gitlab/gitlab-rails"
gitlab_rails['log_directory'] = "/var/log/gitlab/gitlab-rails"
gitlab_rails['service_desk_email_enabled'] = false
nginx['enable'] = true
nginx['listen_https'] = false
nginx['client_max_body_size'] = '250m'
nginx['redirect_http_to_https'] = false
nginx['referrer_policy'] = 'strict-origin-when-cross-origin'
nginx['gzip_enabled'] = true
nginx['real_ip_trusted_addresses'] = ['192.168.1.0/24', '192.168.2.1/32']
nginx['real_ip_header'] = 'X-Forwarded-For'
nginx['real_ip_recursive'] = 'on'
nginx['redirect_http_to_https'] = false
nginx['listen_port'] = 8029
nginx['sendfile'] = 'on'
nginx['proxy_set_headers'] = {"X-Forwarded-Proto" => "https","X-Forwarded-Ssl" => "on"}
nginx['status']['options'] = {
      "server_tokens" => "off",
      "access_log" => "off",
      "allow" => "192.168.30.45",
      "deny" => "all",
}
prometheus['enable'] = false
gitlab_rails['prometheus_address'] = 'prometheus.servers:9090'
node_exporter['enable'] = false
gitlab_workhorse['prometheus_listen_addr'] = "0.0.0.0:9229"
gitlab_exporter['listen_address'] = '0.0.0.0'
gitlab_exporter['listen_port'] = '9168'
registry['debug_addr'] = '0.0.0.0:5001'
sidekiq['listen_address'] = '0.0.0.0'
redis_exporter['listen_address'] = '0.0.0.0:9121'
pgbouncer_exporter['listen_address'] = '0.0.0.0:9188'
gitaly['env'] = {
  'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000'
}
gitaly['configuration'] = {
    concurrency: [
      {
        'rpc' => "/gitaly.SmartHTTPService/PostReceivePack",
        'max_per_repo' => 3,
      }, {
        'rpc' => "/gitaly.SSHService/SSHUploadPack",
        'max_per_repo' => 3,
      },
    ],
    cgroups: {
        repositories: {
            count: 2,
        },
        mountpoint: '/sys/fs/cgroup',
        hierarchy_root: 'gitaly',
        memory_bytes: 500000,
        cpu_shares: 512,
    },
    prometheus_listen_addr: '0.0.0.0:9236',
}
# REF: https://docs.gitlab.com/omnibus/settings/memory_constrained_envs.html#configure-how-gitlab-handles-memory
gitlab_rails['env'] = {
  'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000'
}