supabase / pg_net

A PostgreSQL extension that enables asynchronous (non-blocking) HTTP/HTTPS requests with SQL
https://supabase.github.io/pg_net
Apache License 2.0
213 stars 16 forks source link

"SSL connect error", "Error in the HTTP2 framing layer" while using edge functions #115

Open steve-chavez opened 10 months ago

steve-chavez commented 10 months ago

Problem

A customer has reported "SSL connect error", "Error in the HTTP2 framing layer" showing in the pg_net._http_response table while making calls to Supabase edge functions. The customer informs this happens after 270 requests.

This seems to be related to libcurl:

Proposal

Vendor libcurl, this way we get the latest fixes and we're not dependent on the Supabase platform version.

metarama commented 2 months ago

When are we going to upgrade to using curl version 8?

I am using the hosted version of Supabase. I can easily reproduce this error... just do GET calls that return JSON bodies. I do about 500 calls within couple of minutes and I see these SSL errors.

How do I know the curl version being used by my system? I ran the following query. The result has no mention of the curl version.

select backend_type from pg_stat_activity where backend_type like '%pg_net%';

backend_type
pg_net 0.8.0 worker
metarama commented 2 months ago

This defect in pg_net is a Showstopper. Abandoned pg_net. Using http extension.

steve-chavez commented 1 month ago

The result has no mention of the curl version.

We used to have that at one point https://github.com/supabase/pg_net/pull/122 but it was reverted https://github.com/supabase/pg_net/pull/124. Maybe we can bring it back.

Now that we have a Nix build we might be able to fix this issue too.