Skip to content

Bug: Rebooting the Docker Container Results in 31,519 hours of Visit Duration #4099

Discussion options

You must be logged in to vote

👋 @Makosai

Sessions are kept in memory and can be indefinitely extended if events for it arrive within 30 minutes of each other. A restart causes all sessions to be "flushed". You probably had something like a health-check processes creating a very long session. You can identify it in ClickHouse and drop it manually.

$ docker compose exec plausible_events_db clickhouse client --database plausible_events_db
-- identify the session you want to delete
:) select session_id, formatReadableTimeDelta(max(timestamp) - min(start)) as visit_duration from sessions_v2 group by session_id order by max(timestamp) - min(start) desc limit 10;
-- delete the session
:) delete from sessions_v2 where session_id

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Makosai
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants