[SOLVED] GitWeb snapshot requests cause low memory

Not a request for support, but a suggestion:


For a FreedomBox instance running on a 5 USD/month Amazon Lightsail instance, I noticed from journalctl logs that apache2 was crashing due to a web crawler requesting GitWeb snapshots of several public repositories of mine, causing an out-of-memory (OOM) condition (machine specs: 1 GB RAM, 1 vCPU, 40 GB SSD). A fix I found to improve uptime was to add the following line to the end of /etc/gitweb-freedombox.conf, a configuration file called by /etc/apache2/conf-available/gitweb-freedombox.conf:

$feature{'snapshot'}{'default'} = [];

According to comments regarding snapshots in /usr/share/gitweb/gitweb.cgi (the executable that is GitWeb?), this line disables the snapshot feature for all GitWeb repositories.


GitWeb snapshots are not a feature I use. If the typical FreedomBox user of GitWeb doesn’t use snapshots either, I would suggest either a Plinth toggle(s) for the GitWeb app be added to disable features such as snapshotting or for snapshots to be disabled by default.

I opened an issue to track this:

@vexch has implemented a change to disable snapshotting by default and made all features overridable on a per-repository basis. See FreedomBox/Manual/GitWeb - Debian Wiki . This change will be available in version 23.8.

1 Like