Memory usage plotted over time. Sawtooth pattern on the left, followed by a noticable drop in memory use and a much slower, gradual increase.
https://files.lonely.town/media_attachments/files/114/477/999/713/089/700/original/77891cb29a5de227.png
I've always had an automatic kill+restart for VNDB backend processes when they've processed between 5k-10k requests. A good strategy in general, because it's fairly common for Perl processes to accumulate memory over time.
Now that I'm using prepared statement caching, it seems beneficial to keep the backend processes alive for a bit longer, so I started hunting for memory leaks that I could control. Sure enough, found an accidental reference cycle that was responsible for most of the leaking.
https://g.blicky.net/vndb.git/commit/?id=0d597dd43e1fdb4ff36e2c405825a763942d6d3f
There's probably a few more subtle leaks, but they're not easy to track down...
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.