Skip to content

Excessive startup time with large number of databases #162

Closed
@shimaore

Description

@shimaore

Expected Behavior

Startup should take a few seconds, not a few minutes.

Current Behavior

Currently, the find command in docker-entrypoint.sh might run for a few minutes if there is a large number (e.g. thousands) of databases in a cluster.

Possible Solution

Run the find command in the background instead of the foreground.

Steps to Reproduce (for bugs)

I guess this is fairly obvious, but you could reproduce the issue with

  1. Start a new CouchDB instance with no databases — startup is fast
  2. Create a thousand databases
  3. Restart the instance — startup is slower

Context

Running a large number of databases in production, CouchDB takes a long time to restart after a crash.

Your Environment

  • Version used: 2.3.1
  • Browser Name and version: n/a
  • Operating System and version (desktop or mobile): n/a
  • Link to your project: n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions