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

Plone faster up than postgresql dbinit #43

Open
jensens opened this issue Jan 18, 2022 · 1 comment
Open

Plone faster up than postgresql dbinit #43

jensens opened this issue Jan 18, 2022 · 1 comment
Labels
01 type: bug something does not work 12 prio: high should be fixed soon

Comments

@jensens
Copy link
Member

jensens commented Jan 18, 2022

If we're in a RelStorage environment Postgresql needs time for it initial dbinit.

Docker unfortunately removed to wait for a healthcheck, it only checks if a container is up, so we can not wait for it.

Now, Plone is starting up, because before postgres states its running before dbinit and while dbinit RelStorage tries to create the tables and stored procedures needed.
Postgres, after finished with dbinit, restarts itself. In Plone/RelStorage now the initialization is eventually only half done. Then Plone tries to connect to a partly created structure and fails.
dbinit is fast as well, mostly under 2-5s.

I propose to delay startup of Plone in case if Relstorage is used based on an environment variable. default 5s.
dinit runs once, so after initialization the variable can be set to 0s for the cluster.

Or are better ideas around?

@jensens jensens added 01 type: bug something does not work 12 prio: high should be fixed soon labels Jan 18, 2022
@stevepiercy
Copy link
Contributor

I have run into this myself. Here are two discussions that I found helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 type: bug something does not work 12 prio: high should be fixed soon
Projects
None yet
Development

No branches or pull requests

2 participants