"SSL connect error", "Error in the HTTP2 framing layer" while using edge functions
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:
- https://github.com/curl/curl/issues/3750
- https://github.com/curl/curl/issues/10634. According to https://github.com/curl/curl/commit/cbe9d82c22c38753ad6372e5040e4c51b3695dc7, this fix is available on curl 8.0.0. While the Supabase platform has
curl 7.68.0.
Proposal
Vendor libcurl, this way we get the latest fixes and we're not dependent on the Supabase platform version.
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
This defect in pg_net is a Showstopper. Abandoned pg_net. Using http extension.
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.
This should no longer happen now that Supabase cloud has libcurl 8.6.0.
Please reopen if the error persists.
@steve-chavez we are facing the same issue, a lot of POST requests are going into these errors.
@harshgour Which version of pg_net are you using? Check with:
select extversion from pg_extension where extname = 'pg_net';
The latest version is 0.10.0