Skip to content

pg_net Background Worker Fails Silently for All Network Requests in Local Dev #4286

@jyork03

Description

@jyork03

Describe the bug
In the local development environment, the pg_net background worker appears to run in an isolated context without network or SSL capabilities. This causes any pg_net request to fail silently by being queued in net.http_request_queue but never receiving a response, with no errors appearing in any logs.

To Reproduce
Steps to reproduce the behavior:

  1. Initialize a new project: supabase init
  2. Start the local services: supabase start
  3. Connect to the local database using any SQL client.
  4. Run a simple pg_net request to a reliable public endpoint:
    SELECT * FROM net.http_get('https://httpbin.org/get');
  5. Observe that the query either hangs or returns no result.
  6. Check the pg_net tables to confirm the silent failure:
    -- This will show 1 row
    SELECT * FROM net.http_request_queue;
    
    -- This will show 0 rows, indicating no response was ever processed
    SELECT * FROM net._http_response;

Expected behavior
The pg_net net.http_get call to the public API should succeed and return a request id, and eventually create a row in the net._http_response table with a 200 status code.

System information

  • Ticket ID: SU-270954
  • Version of OS: macOS (Apple Silicon)
  • Version of CLI: 2.48.3
  • Version of Docker: 28.3.3
  • Versions of services:
       SERVICE IMAGE         | LOCAL                  | LINKED
    ------------------------|------------------------|------------
       supabase/postgres       | 17.6.1.003             | 17.6.1.003
       supabase/gotrue         | v2.179.0               | v2.179.0
       postgrest/postgrest     | v13.0.5                | v13.0.5
       supabase/realtime       | v2.51.11               | -
       supabase/storage-api    | v1.28.0                | -
       supabase/edge-runtime   | v1.69.12               | -
       supabase/studio         | 2025.10.01-sha-8460121 | -
       supabase/postgres-meta  | v0.91.6                | -
       supabase/logflare       | 1.22.4                 | -
       supabase/supavisor      | 2.7.0                  | -
    

Additional context

  • This appears to be a recent regression. This functionality was working correctly in the past. The last known successful run of a similar cron job in my local environment was on 2025-09-14.
  • The version of pg_net installed is 0.14.0.
  • The debugging process has definitively isolated the issue to the pg_net background worker's execution environment. An interactive shell inside the Postgres container (docker exec) has full network and SSL capabilities to both local services (host.docker.internal) and the public internet, but the pg_net worker does not.

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