Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart plugins on error #2719

Merged
merged 5 commits into from
Dec 10, 2020
Merged

Restart plugins on error #2719

merged 5 commits into from
Dec 10, 2020

Conversation

mariusandra
Copy link
Collaborator

Changes

  • Restart posthig-plugin-server in case it crashes. For example: the process runs out of memory on a tiny node. This way event ingestion might resume automatically. Running the bin/posthog-plugin-server script and pressing CTRL+C still stops the script like before. Just now if the node script gets killed, it'll restart. I tried this via pm2, but couldn't its "no-daemon" mode is actually just "print logs" and was too tricky to work around.
  • Also updated posthog-plugin-server to 0.4.3, which supports getting all the config from $CONFIG directly. This still seems like the safest way to export settings from django other than making a custom script. This print_settings has some formats other than JSON, but none I would feel comfortable piping to bash to export as envs. Too many serialisation and string escaping issues this can run into that I'd just avoid.

WIP since I want to still test this in the heroku review app manually.

Checklist

  • All querysets/queries filter by Organization, by Team, and by User
  • Django backend tests
  • Jest frontend tests
  • Cypress end-to-end tests

@timgl timgl temporarily deployed to posthog-restart-plugins-skhmop December 9, 2020 21:35 Inactive
@mariusandra mariusandra marked this pull request as ready for review December 9, 2020 21:51
@mariusandra
Copy link
Collaborator Author

The heroku review app seems to work well. This can be reviewed!

@Twixes Twixes merged commit b5b7276 into master Dec 10, 2020
@Twixes Twixes deleted the restart-plugins-on-error branch December 10, 2020 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants