Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Memory Leaks? #262

Open
Syonyk opened this issue Aug 30, 2021 · 4 comments
Open

Possible Memory Leaks? #262

Syonyk opened this issue Aug 30, 2021 · 4 comments
Labels

Comments

@Syonyk
Copy link

Syonyk commented Aug 30, 2021

It's been long enough since I've done much web or high level languages that I'm not even sure where to go about starting to debug this, but:

I've been using lower power, lower memory systems lately (ARM SBCs and similar), and they typically only have 4GB RAM. Doing a full blog render (250 posts, ~5500 images), the process runs out of memory, even with swap, and is killed. However, resuming it goes further before running out of memory, and once I have the first render pass of all the images done, it works fine.

The bulk of the work going into my blog render is JPT - is it possible that it leaks memory somehow on large/long runs? And is there a decent way to evaluate this other than looking at the working set size on a very long blog render?

@rbuchberger
Copy link
Owner

Hmm.... You're building a much bigger site than I've ever attempted! That's definitely a problem though - building with tons of images should just take awhile, it shouldn't blow up your memory usage.

Each tag should basically be its own instance without anything carried between them, but it's possible we're saving something somewhere we shouldn't be. I don't have much experience optimizing memory usage in Ruby applications, but it'll be a fun opportunity to learn something. I'll have a look when I get time. Thanks for the bug report!

@Syonyk
Copy link
Author

Syonyk commented Aug 31, 2021

I migrated off Blogger not too long ago, and it's 6 years of photo heavy posts. The extension is exactly what I was looking for to keep bandwidth down - I'm on a slower connection, and I utterly hate people who shove full size images down as thumbnails, so was looking for something that would do the reactive sizing, and found a perfect option here!

If there are any tests you want me to run, it's trivial to reproduce the crashes on one of my 4GB ARM boxes. I just don't know where to go about looking.

And it's certainly possible the leak is somewhere else, but this is about the only non-core extension I'm using.

@rbuchberger
Copy link
Owner

I wouldn't be surprised if I'm storing something somewhere which only becomes noticeable on huge builds. I have some ideas on where to start, but I'll definitely run any solutions by you for testing.

I can't make any promises on when I will get to this - we just had a kid and I'm working full-time, so I don't have a ton of free time to spend hacking on JPT. I'll see what I can do though!

@Syonyk
Copy link
Author

Syonyk commented Sep 1, 2021

No rush, I totally understand kids and job and such! I may try to learn to do some profiling as well, see if I can find anything obvious since I've got the site to reproduce it. It doesn't actually block anything, as my typical renders are on higher power hardware with more RAM, and as noted, I can just resume the process and it gets further/completes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants