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

Deleting records frequently hangs for one minute or crashes #329

Open
crystalfp opened this issue Apr 13, 2023 · 1 comment
Open

Deleting records frequently hangs for one minute or crashes #329

crystalfp opened this issue Apr 13, 2023 · 1 comment

Comments

@crystalfp
Copy link

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:
@glynnbird
Copy link
Contributor

I suggest debugging your CouchDB setup with curl or using the dashboard. I very much doubt that Nano is at fault here, just that CouchDB is not replying within 60s and it would be helpful to get to the bottom of why that is the case.

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

No branches or pull requests

2 participants