Pakon.db filling up tmp

Hello,
that’s almost correct, but you need to stop pakon-monitor first (it copies it’s database to /srv/pakon when the service is stopping).
So:

/etc/init.d/pakon-monitor stop
rm /srv/pakon/*
/etc/init.d/pakon-monitor start

should do the work. Just remember that it deletes the whole history.

In the 3.11 release, the archivation process was reworked quite heavily, hopefully solving this problem. When the “database is locked” error happened before, old flows remained in /var/lib/pakon.db, possibly for many days, which could lead to filling up the whole tmpfs. That hopefully shouldn’t happen anymore.

Also, as a safety measure, we added a hard limit of the /var/lib/pakon.db database. When the database grows too much, the oldest records are deleted. The limit is pretty high, so it should be triggered only when the database is getting really insanely big. It’s probably less than ideal, but we don’t see a better way what to do in this situation. It’s probably better to lose a part of logs than to crash the router.

1 Like

Thanks alot. Maybe would be nice to have a “Reset” button on https://192.168.1.1/foris/config/main/pakon/ page for resetting the history :wink:

just add the issue again last week. Pakon.db is still filling up all the space:

root@turris:/tmp# du -sh lib/*
0	lib/collectd
0	lib/misc
856.2M	lib/pakon.db

Btw I’m not even using pakon, why is it running ?

There should be something similar like there is rollover for logs, e.g. move data of say the past 24 hours to a secondary db and wipe those secondary db say after a period of 8 or 10 or 14 days. I does not make sense (or does it?) to keep the data indefinitely unless sufficient storage space is available.

Bug is still there, there is no solution ?

root@turris:/tmp# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/mmcblk0p1            7.3G      1.3G      6.0G  18% /
tmpfs                  1010.8M   1010.8M         0 100% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
root@turris:/tmp# ls -lh ./lib/pakon.db
-rw-r--r--    1 root     root      990.8M Mar 12 15:04 ./lib/pakon.db

How to stop pakon.db ?

Hello ? Is there anyone here ?

It happened again:

root@turris:~# du -sh /tmp/lib/pakon.db
995.1M	/tmp/lib/pakon.db

When it does, foris is unavailable, and kresd is buggy.

So that means the hard limit in pakon.db is not working.

I’ve tried to stop pakon-monitor but it says db is locked. I will try to figure out by whom.

Yes, I do have the same issue as well. Nobody seems to care. Is it possible to uninstall pakon? I do not need it for anything.

Just uncheck it in foris -> updater and click save. It should then be removed (maybe you have to approve it if you have update approvals enabled)

Don’t forget to then also disable device detection as was stated here before.

Nobody seems to care.

The forum is not the proper channel, which you should use to report bugs, also forum is not a bug tracker at all. This was already said on the forum many times. If you’d like to report a bug, we have in our documentation article for Error reporting. I’d kindly ask you to follow it and send us the necessary details. We’d like to have more details about it and diagnostics should help us. Thank you.

Hi

Have the same problem. Looks like the cron job does not clean up the db properly.

root@shulyaka:~# ls /tmp/lib/pakon.db -lh
-rw-r--r--    1 root     root      204.9M Apr 17 19:06 /tmp/lib/pakon.db
root@shulyaka:~# /etc/init.d/pakon-monitor stop
Error: database is locked
root@shulyaka:~# time /usr/bin/python3 /usr/libexec/pakon-light/archive.py && time /usr/libexec/pakon-light/backup_sqlite.sh /var/lib/pakon.db /srv/pakon/pakon.db.xz
INFO:root:deleted 5149 flows from detail level live, inserted 1639 flows to detail level 0
INFO:root:716249 flows remaining in live database
INFO:root:deleted 1639 flows from detail level 0, inserted 360 flows to detail level 1
INFO:root:deleted 0 flows from detail level 1, inserted 0 flows to detail level 2
INFO:root:deleted 68 flows from detail level 2, inserted 68 flows to detail level 3
INFO:root:deleted 90 flows from detail level 3, inserted 90 flows to detail level 4
INFO:root:0 flows remaining in archive on details level 0
INFO:root:9241 flows remaining in archive on details level 1
INFO:root:38727 flows remaining in archive on details level 2
INFO:root:80905 flows remaining in archive on details level 3
INFO:root:76922 flows remaining in archive on details level 4
real	9m 22.24s
user	7m 17.97s
sys	0m 40.12s
real	7m 49.56s
user	7m 6.51s
sys	0m 18.16s
root@shulyaka:~# ls /tmp/lib/pakon.db -lh
-rw-r--r--    1 root     root      204.9M Apr 17 19:25 /tmp/lib/pakon.db

TurrisOS 5.2.0, HBT.
The concern is that it says it deleted 5149 of 721398 records, which is 0.7%. Also, the file size does not decrease.