Bug: Rebooting the Docker Container Results in 31,519 hours of Visit Duration #4099
-
What I did:
$ docker compose stop plausible plausible_events_db
$ docker compose rm plausible plausible_events_db
$ docker compose up -d Is it possible to remedy or delete this entry? Whether it's manually or automatically? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
👋 @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=xxx;
-- delete the events
:) delete from events_v2 where session_id=xxx; |
Beta Was this translation helpful? Give feedback.
-
Hi @ruslandoga! Thanks a ton for the reply. Here's my list of sessions -- I also increased the size of the list: I did remove one that was 56 minutes long earlier. This is the result. But that change in the number could also be because it started to average out the rest of the day: How much should I delete? |
Beta Was this translation helpful? Give feedback.
-
Updating the database back to 24.3.3.102-alpine fixed it apparently. So this is resolved. If you want to investigate any of it, I'm willing to prod around to see why. |
Beta Was this translation helpful? Give feedback.
👋 @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