Skip to content

Deleting records frequently hangs for one minute or crashes #329

@crystalfp

Description

@crystalfp

Expected Behavior

In my server I delete a single record from the db taking around 100 milliseconds. The deletion is done this way:

const sts = await databaseHandler.bulk({docs: [
  {
    _id: 'CRgLVMx5ELyYa8bl9sDad+++',
    _rev: '73-12c2ea0e5981bf59e84db86ab9660265',
    _deleted: true
  }
]});

This works and takes 90-250 milliseconds, sometimes 2 seconds. The returning status is:

[
  {
    ok: true,
    id: 'CRgLVMx5ELyYa8bl9sDad+++',
    rev: '74-50b80ed261f55ea4f08999ec94c2ec3b'
  }
]

Current Behavior

Frequently the bulk call will take around 60 seconds and returns:

[
  {
    id: 'CRgLVMx5ELyYa8bl9sDad+++',
    error: 'unknown_error',
    reason: 'undefined'
  }
]

or sometimes CouchDB returns status 500

Error: couch returned 500
    at responseHandler (D:\Projects\VUEIdeaIgniterEnvironment\server\node_modules\nano\lib\nano.js:206:20)
    at D:\Projects\VUEIdeaIgniterEnvironment\server\node_modules\nano\lib\nano.js:456:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Really I don't know where to look to understand what happens

Possible Solution

Well, for my side I could not wait for the deletion and returning immediately, but seems a dirty workaround. At least having a way for understanding what happens.

Steps to Reproduce (for bugs)

  1. See above

Context

Your Environment

  • Version used: 10.1.2
  • CouchDB: 3.3.1
  • Browser Name and version: Chrome 112.0.5615.50 (Official Build) (64-bit)
  • Operating System and version (desktop or mobile): Desktop Windows 11 64 bits
  • Link to your project:

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