Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

Plugin server is marked as not live while mmdb is being downloaded #391

Closed
1 task done
macobo opened this issue May 13, 2021 · 4 comments · Fixed by PostHog/posthog#4457
Closed
1 task done

Plugin server is marked as not live while mmdb is being downloaded #391

macobo opened this issue May 13, 2021 · 4 comments · Fixed by PostHog/posthog#4457
Assignees

Comments

@macobo
Copy link
Contributor

macobo commented May 13, 2021

Bug description

I want to deploy posthog. I boot posthog up, go through preflight and see this

image

Looking at the logs, I see this:

[MAIN] 20:54:30 ⏳ Downloading GeoLite2 database from PostHog servers...

Which takes around a minute to resolve

Expected behavior

Don't block preflight while mmdb is being downloaded

How to reproduce

  1. Boot a new posthog cluster
  2. Go to preflight
  3. See "warning" for plugin server, though plugin server is up

Environment

  • self-hosted PostHog, version/commit: 1.25.0

Additional context

Thank you for your bug report – we love squashing them!

@mariusandra mariusandra transferred this issue from PostHog/posthog May 18, 2021
@Twixes
Copy link
Member

Twixes commented May 21, 2021

Maybe this should be a "loading" state, between "offline" and "online". Thing is, the plugin server is not really online if it's not able to ingest yet (why in this case: point 6), so showing preflight as all green and allowing to proceed would be kind of premature. Unless the wait time is a significant source of friction (though it shouldn't be, actual deployments should be done with this in a few seconds, downlink is fast in data centers).

@macobo
Copy link
Contributor Author

macobo commented May 21, 2021

Unless the wait time is a significant source of friction

It has been development-wise. It takes 1-2 minutes to download mmdb after a fresh database purge, adding a ton of waiting around to get to a good state. I've needed to recreate my dbs quite often (multiple times per day) when playing with clickhouse migrations, custom stats, etc and this has been the most painful part about it.

@Twixes
Copy link
Member

Twixes commented May 21, 2021

I see. I suppose in your case you can just use DISABLE_MMDB=1 and this won't be happening (and you won't miss this feature while developing probably). Would that work for you?
Arguably we now preinstall & preenable the GeoIP plugin regardless of this setting (as it's only used for such specific circumstances), but I'll adjust that so that there's no conflict.

@macobo
Copy link
Contributor Author

macobo commented May 21, 2021

That sounds like a fair workaround! 🙇

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants