Skip to content

headersTimeout triggered after headers have been received #268

Closed
@ronag

Description

@ronag

Run the following against a CouchDB 1.6 instance:

const { Client } = require('.')
const stream = require('stream')

const client = new Client('http://localhost:5984', {
  socketTimeout: 10e3,
  headersTimeout: 10e3
})

client.stream({
  method: 'GET',
  path: '/nxt/_changes?feed=continuous&heartbeat=5000'
}, ({ headers }) => {
  console.log(headers)
  return new stream.Writable({
    write (chunk, encoding, callback) {
      console.log(chunk.toString())
      callback()
    }
  })
}, (err) => {
  console.error(err)
})

Note that this is a long polling request.

It will log the headers and then after 10 seconds still fail with a headers timeout error.

Probably a problem in node_http_parser in Node?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: help-wantedThis issue/pr is open for contributions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions