You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you for creating this application. It is really awesome to be able to use blocklists without any extra hardware.
I have recently been having issues with an USG. The application runs out of memory before completion.
I was using v1.2.4.2, and I tried upgrading to v1.2.4.5, but it didn't help. I tried rebooting and re-running the update task, but it ran out of memory again.
I don't know much about Go development, but I tried to do some debugging.
I was using the following command in each test case: time /config/scripts/update-dnsmasq -v
And while the script was running, I was watching memory usage in another session: watch free -h
I've built with make mips and SCP'd the executable to the USG.
It took a longer time to finish, but it never ran out of memory this way.
Sample run with GC 20%:
NOTI[02f]21:53:22.825: Total entries found: 418129
NOTI[030]21:53:22.852: Total entries extracted 362209
NOTI[031]21:53:22.854: Total entries dropped 55920
The least amount of free memory after Total entries dropped:
@laszlojau, thank you for taking the time to figure out a workaround for processing arger lists. My preference is not to use the debug.runtime as a fix. You should also be able to achieve the same result without changing the code like this:
Thank you for your help. Sorry, forgot to reply with my findings.
I have changed the scheduled task to include GOGC=20 as per your comment and it has been working perfectly these past few months.
set system task-scheduler task update_blacklists executable path "GOGC=20 /config/scripts/update-dnsmasq-cronjob.sh"
The only caveat is that it throws the following error when you issue the command:
sh: line 0: [: GOGC=20: binary operator expected
Warning: 'GOGC=20' lies outside of /config/scripts/update-dnsmasq-cronjob.sh directory. It will not get preserved during image upgrade.
But it seems like it can be safely ignored, as the generated cron spec is valid:
First of all, thank you for creating this application. It is really awesome to be able to use blocklists without any extra hardware.
I have recently been having issues with an USG. The application runs out of memory before completion.
I was using v1.2.4.2, and I tried upgrading to v1.2.4.5, but it didn't help. I tried rebooting and re-running the update task, but it ran out of memory again.
I don't know much about Go development, but I tried to do some debugging.
I was using the following command in each test case:
time /config/scripts/update-dnsmasq -v
And while the script was running, I was watching memory usage in another session:
watch free -h
RAM before running the script (in each test case)
Test case for v1.2.4.5
The least amount of free memory after
Total entries dropped
, right before the error:Time:
Test case: GC 20%
I've added 2 lines in
main.go
in the latestmaster
branch:I've built with
make mips
and SCP'd the executable to the USG.It took a longer time to finish, but it never ran out of memory this way.
Sample run with GC 20%:
The least amount of free memory after
Total entries dropped
:Memory freed by GC:
Memory before completion:
Time:
The text was updated successfully, but these errors were encountered: