Goaccess: when i use --load-from-disk --keep-db-files with --daemonize,it's not working well

Created on 5 Dec 2018  ·  9Comments  ·  Source: allinurl/goaccess

hello allinurl:
when i use following command to save data on-disk,it's working well.when i restart it ,i can see the historical data.eg:
goaccess /usr/local/openresty/nginx/logs/go_access.log -o /data/web/report/report20181204.html --log-format=COMBINED --real-time-html --db-path=/tmp/goaccess --load-from-disk --keep-db-files --debug-file=/tmp/goaccess.log
but when i add the parameter '--daemonize',eg:
goaccess /usr/local/openresty/nginx/logs/go_access.log -o /data/web/report/report20181204.html --log-format=COMBINED --real-time-html --db-path=/tmp/goaccess --load-from-disk --keep-db-files --debug-file=/tmp/goaccess.log --daemonize
the process exists and the function of real-time data works well.Then i kill this process and restart as this command(with --daemonize),no any historical data i can see.
Is this a conflict when i use '--load-from-disk --keep-db-files' and '--daemonize' together?

please help me,thanks!

log-processing

Most helpful comment

According to your method,it is usefull. when i use the command kill pid other than kill -9 pid,the data can be persisted on disk.Thank you very much.

All 9 comments

I've experienced the same issue. First, I was reading old data into the database (using --load-from-disk --keep-db-files --process-and-exit, but without --daemonize). After that, when trying to run the daemon (using --load-from-disk --keep-db-files --daemonize) on the current log file, the old data is gone.

With version 1.2, this did not happen.

Unfortunately,i have this problem in version 1.3.

@zeven0707 how are you killing the process?

@allinurl I use ps -ef|grep goaccess to find the pid of goaccess,then kill -9 pid

The database may get corrupted if you use SIGKILL and may not save the data. Please try SIGINT or simply kill pid

Okay,i'll try.

According to your method,it is usefull. when i use the command kill pid other than kill -9 pid,the data can be persisted on disk.Thank you very much.

Not working for me. I don't kill the process but use --process-and-exit instead.

@freemp Can you show the whole command of --process-and-exit,then i have a try.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ychunc picture ychunc  ·  3Comments

domainoverflow picture domainoverflow  ·  3Comments

eroldru picture eroldru  ·  3Comments

SergioDG-YCC picture SergioDG-YCC  ·  3Comments

vivekkrish picture vivekkrish  ·  3Comments