plone / plone/container-backend
Plone faster up than postgresql dbinit
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 18
- Forks
- 18
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 2
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Begin by tracing the Docker startup and healthcheck path for Plone with RelStorage and PostgreSQL, then verify how the proposed environment variable could affect startup timing. Done means Plone no longer connects while PostgreSQL dbinit is incomplete, while the delay remains configurable for an initialized cluster.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, postgresql, shell
- Domain
- databases, devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100