Projects::TreeController#show allocates (and possibly leaks) quite a bit of memory
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
http://yorick-influxdb.gitlap.com/dashboard/db/system-statistics shows the following memory usage pattern:
If we select the area around the peak occurring around 05:00, jump to the Transaction Overview dashboard, and sort the "Transaction Details" table by the "Memory" column we see the following:
Moving to the Ruby Object Statistics dashboard we see the following:
Moving to the Garbage Collector we see the following:
While it's not clear yet if the Projects::TreeController#show method is to blame for all the Rugged/Git objects and the increase in memory this does look really suspicious.
I've been toying around with getting some extra tooling into Sherlock (so I can reproduce/confirm/rule-out these suspicions locally) but thus far I've had little success. I thought about using https://github.com/ko1/allocation_tracer so I could find where objects are being allocated (instead of just the counts) but sadly it keeps segfaulting Ruby (it appears to conflict with rblineprof).
I'll do some digging and thinking about how to best approach these sort of problems, and hopefully I can actually solve this problem.
NOTE: the timestamps in the above screenshots are in timezone Europe/Amsterdam, I've yet to change all dashboards to use UTC instead.



