Skip to content

Database Webhooks get fired >1s after record inserted #175

Open
@davidfant

Description

@davidfant

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When a record is inserted I have a database webhook trigger that points at a Supabase function. There is always a delay of slightly over 1s between when a record is inserted (record.created_at) and when the trigger is fired. I'm running this locally, so there should be minimal networking overhead

For example:

Record created at: 2024-06-30T10:20:40.036685+00:00
new Date() in supabase function: 2024-06-30T10:20:41.129Z

To Reproduce

  1. Create a table
  2. Set up a database webhook trigger pointing at a Supabase function. console.log both record.created_at and new Date() to see the times
  3. Insert a record into the table

Expected behavior

Webhooks should be fired ~immediately

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macOS
  • Browser (if applies) -
  • Version of supabase-js: 2.43.4
  • Version of Node.js: v21.1

Additional context

If it's not related to an actual issue in Supabase, please let me know anything I can do to cut down on the latency

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status

      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions