Skip to content

TimeoutNegativeWarning: when calling subscription.close() #38163

Closed

Description

@spdaley
  • Package Name: @azure/event-hubs

  • Package Version: 6.3.0

  • Operating system: AWS Lambda

  • nodejs

    • version: v24
  • typescript

    • version: 5.9.3

Describe the bug
We are using the @azure/event-hubs library to retrieve messages from event hub subscriptions in an AWS lambda. We currently do this 1000s of times a day. A couple of times a week we will see an error looking something like the following:

2026-04-14T23:35:44.371Z	4c484153-7173-4e1a-b35c-354e025616e2	ERROR	(node:20) TimeoutNegativeWarning: -1 is a negative number.
Timeout duration was set to 1.
    at new Timeout (node:internal/timers:194:17)
    at setTimeout (node:timers:117:19)
    at /opt/nodejs/node_modules/@azure/core-amqp/dist/commonjs/requestResponseLink.js:101:21
    at new Promise (<anonymous>)
    at RequestResponseLink.sendRequest (/opt/nodejs/node_modules/@azure/core-amqp/dist/commonjs/requestResponseLink.js:72:16)
    at CbsClient.negotiateClaim (/opt/nodejs/node_modules/@azure/core-amqp/dist/commonjs/cbs.js:155:71)
    at core_amqp_1.defaultCancellableLock.acquire.abortSignal.abortSignal [as task] (/opt/nodejs/node_modules/@azure/event-hubs/dist/commonjs/withAuth.js:72:78)
    at CancellableAsyncLockImpl._execute (/opt/nodejs/node_modules/@azure/core-amqp/dist/commonjs/util/lock.js:110:49)
    at runNextTicks (node:internal/process/task_queues:64:5)
    at listOnTimeout (node:internal/timers:567:9)

The actual workflow is not affected at all by it as everything works just fine but this warning, since it's an ERROR, does trigger our operation's team alerts.

To Reproduce
Subscribe to event hub repeatedly and call close. Since this only happens a few times a week out of 10s of thousands of times I don't have an easily reproducible case unfortunately.

Expected behavior
We don't see that TimeoutNegativeWarning error

Additional context
Just to reiterate above, nothing fails here at least. But the log messages do cause ops angst.
Thanks.

Activity

  1. added
    customer-reported
    needs-triage
    question
    on Apr 16, 2026
  2. added a commit that references this issue on Apr 16, 2026
    9af1adc
  3. added
    Client
    and removed
    needs-triage
    on Apr 16, 2026
  4. added
    needs-team-attention
    on Apr 16, 2026
  5. deyaaeldeen commented on Apr 23, 2026

    @deyaaeldeen
    Member

    Hi Sean Daley (@spdaley), thanks for raising this issue. I believe it has been addressed in this new patch release: https://www.npmjs.com/package/@azure/event-hubs/v/6.0.4. Please give it a try and let me know if you have any other issues.

  6. added
    issue-addressed
    on Apr 23, 2026
  7. github-actions commented on Apr 23, 2026

    @github-actions
    Contributor

    Hi Sean Daley (@spdaley). Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

  8. removed
    needs-team-attention
    on Apr 23, 2026
  9. github-actions commented on Apr 30, 2026

    @github-actions
    Contributor

    Hi Sean Daley (@spdaley), since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.

  10. locked and limited conversation to collaborators on Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Azure.CoreClientEvent HubsService Buscustomer-reportedissue-addressedquestion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions