ddworken / hishtory

Your shell history: synced, queryable, and in context
https://hishtory.dev
MIT License
2.42k stars 41 forks source link

History is not syncing between all servers #208

Open yoplait2 opened 2 months ago

yoplait2 commented 2 months ago

Since the beginning I have installed hishtory logs are not syncing between them :

I think it might be related to this entry log :

info msg="github.com/ddworken/hishtory/client/lib/lib.go:599 database is locked" time="2024-04-24T17:32:19Z" level=info msg="github.com/ddworken/hishtory/client/hctx/hctx.go:105 database is locked (261)\n[0.018ms] [rows:0] PRAGMA journal_mode = WAL" fromSQL=true time="2024-04-24T17:32:19Z" level=info msg="github.com/ddworken/hishtory/client/hctx/hctx.go:106 database is locked (261)\n[0.017ms] [rows:0] CREATE INDEX IF NOT EXISTS start_time_index ON history_entries(start_time)" fromSQL=true time="2024-04-24T17:32:19Z" level=info msg="github.com/ddworken/hishtory/client/hctx/hctx.go:107 database is locked (261)\n[0.023ms] [rows:0] CREATE INDEX IF NOT EXISTS end_time_index ON history_entries(end_time)" fromSQL=true time="2024-04-24T17:32:19Z" level=info msg="github.com/ddworken/hishtory/client/hctx/hctx.go:108 database is locked (261)\n[0.019ms] [rows:0] CREATE INDEX IF NOT EXISTS entry_id_index ON history_entries(entry_id)" fromSQL=true

I have updated to the latest version and init to the same secret key

The other logs are POST api requests that seems to go through my internet is ok on both server
Server1 hiSHtory: v0.292 Enabled: true Secret Key: xxxx Commit Hash: efb9b87ebe961efa3c6a20f8048e90f680b73d1f

Server2 hiSHtory: v0.292 Enabled: true Secret Key: xxxx Commit Hash: efb9b87ebe961efa3c6a20f8048e90f680b73d1f

ddworken commented 2 months ago

Hmm, I don't think it is related to that log message. Can you run try running hishtory status -v on both computers since that has some useful information about sync state. The other thing you can try is running hishtory reupload on both computers which should fix this issue by having each machine re-upload their entire history.