GithubHelp home page GithubHelp logo

Comments (9)

enjunear avatar enjunear commented on April 28, 2024

I've commented out the mahakala for now. Works fine without it, but obviously you don't get to block all those 1.6 million domains. That's well over 900,000!!!

from pi-hole.

jacobsalmela avatar jacobsalmela commented on April 28, 2024

Yeah this annoying error has been coming up a lot more recently. I'm looking into increasing the swap size somehow via gravity.sh

from pi-hole.

jpearsall avatar jpearsall commented on April 28, 2024

I was able to get around this by bypassing the assignment to the data variable and piping the curl to awk (shamelessly pulled from the if/then conditional on data further down) and directing it then redirecting it to the destination file.

from pi-hole.

jacobsalmela avatar jacobsalmela commented on April 28, 2024

I actually used to have it setup that way, but we changed it for a few reasons:

  • to limit writing to the SD card (reduces the likelihood of corruption)
  • to be a respectful netizen by not downloading the entire list needlessly every time gravity.sh runs

so I would like to keep it as is and either find a way to increase the memory or come up with a new solution all together.

from pi-hole.

korhadris avatar korhadris commented on April 28, 2024

If I maintain 2. in your list above and decrease file read/writes, can I rearrange some of the intermediate files that are at the end of gravity.sh, in gravity_advanced()? There are some sed sections that are no longer needed, or could be moved, with some of my latest commits. If so, I'd like to store the data from the curl requests to disk, that way $data isn't holding the whole mahakala list in memory at one time. Although, I'd still assume it would still use a bit of memory when it gets to the sort | uniq section later.

I'm not running on a RPi to test out memory bounds... (Running odroid XU3 and C1 for testing.)

from pi-hole.

jacobsalmela avatar jacobsalmela commented on April 28, 2024

If we can increase the swap size to 500 or more, if needed, we can still limit the writing to the SD card since the swap will only be used when needed. I was thinking of something like this:

dphys-swapfile swapoff
echo -e "CONF_SWAPSIZE=500" > /etc/dphys-swapfile
dphys-swapfile setup
dphys-swapfile swapon

from pi-hole.

jacobsalmela avatar jacobsalmela commented on April 28, 2024

I made a more streamline development branch so try it out and let me know if you still get the memory allocation error.

https://github.com/jacobsalmela/pi-hole/blob/development/gravity.sh#L47-L70

from pi-hole.

x20mar avatar x20mar commented on April 28, 2024

I'm getting this issue, but I wanted to check if this is just limited to certain versions of the rpi? I have Raspberry Pi 1 Model B (512MB)

from pi-hole.

jacobsalmela avatar jacobsalmela commented on April 28, 2024

I think it is more prevalent on the original B, but it depends on what people have running on their Pi. I think this is a good all around fix.

from pi-hole.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.