"GitLab has memory leaks."
Their solution is monkey patching their application to check its memory usage after every 16th HTTP request and commit suicide if it's too much. This page is telling sysadmins who install their own GitLab instance how to configure this.
You know, I empathise with GitLab here. git.sr.ht had a memory leak once. My solution was pretty interesting: I wrote a shell script on a cronjob set to every 5 minutes, which checked the heap size of the git.sr.ht backend and, if it was within a certain percentage of system memory, it sent a SIGTERM along and
Wait, no, none of that is what happened. What happened is I fixed the memory leak.
OH MY GOD
There are MORE pages detailing how to kill memory hungry GitLab processes in MORE situations and with MORE approaches catered to your PARTICULAR OOM killing needs
@sir they also had a similar problem with nazis but they somehow managed to come up with a worse solution
@sir I remember the days when PHP's per-request limit was 8MB and anything demanding higher limits was rightly considered a war crime
Even MediaWiki only needs 20MB
@sir I've been a rails developer since the beginning, and have delt with many memory leaks. It's pretty hard to leak memory in Ruby itself, the vast majority of the time it's from deep within C extensions, like imagemagik or libxml.
@sir I hope you did notice there was a section called 'Switch to Puma' right above the page's link in the navigation sidebar.
"As of GitLab 12.9, Puma has replaced Unicorn. as the default web server. [...]
Why switch to Puma?
Puma has a multi-thread architecture which uses less memory than a multi-process application server like Unicorn. [...]"
@sir this solution is rather quite elegant and future proof
@sir this is horrid even for rails
@sir We wanted to install Gitlab on our Kubernetes cluster at work. Gitlab provides official installation charts.
> In order to deploy GitLab on Kubernetes, the following are required:
> A Kubernetes cluster, version 1.12 or higher. 8vCPU and 30GB of RAM is recommended.
This was unthinkable when the backend for our main project uses 80MBs of RAM. Needless to say, we scraped the idea, and just installed Gitea and Jenkins (Not perfect, but better than throwing away 30GBs).
@rozenglass jeesh, that's insane
@sir @rozenglass I'm happy that Pagure still stays within those nice reasonable buckets. In the *high end*, deployments need at most 4GB of RAM, and most deployments get away with 1GB of RAM or less for *everything* (pagure, redis, pgsql). If it didn't, I don't think I could run it for my personal use on my tiny VM...
XFCE switches to gitlab
gitlab adopted by KDE
corporate lobbying, now in "open source" (tm)
@sir I'm quite surprised to have read something like this.
@sir the next top paying job will be to fix the memory leaks in all this crap software. Start learning valgrind.
@sir this has always been the problem with rails
Clever! By counting to exactly 16, they only need 4 bits to store the counter, saving some valuable memory!
@sir No, just no.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!