Skip to content

supabase_rest container constantly crashes #3550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
empz opened this issue May 9, 2025 · 8 comments
Closed

supabase_rest container constantly crashes #3550

empz opened this issue May 9, 2025 · 8 comments
Labels
bug Something isn't working

Comments

@empz
Copy link

empz commented May 9, 2025

I'm using latest Supabase CLI 2.22.12 on Windows 11 with Docker Desktop v4.40.0 and Node.js 20.18.2

Whenever I refresh my Next.js app during development which triggers a simple profile fetch on the database, the query seems to fail and the supabase_rest container restarts.

Assertion failed: *(&once->n) != 4 (threads.c: k5_once: 564)
09/May/2025:10:47:42 +0000: Starting PostgREST 12.1...
09/May/2025:10:47:42 +0000: Attempting to connect to the database...09/May/2025:10:47:42 +0000: Admin server listening on port 3001
09/May/2025:10:47:42 +0000: Listening on port 3000
Assertion failed: *(&once->n) != 4 (threads.c: k5_once: 564)
09/May/2025:10:47:43 +0000: Starting PostgREST 12.1...
09/May/2025:10:47:43 +0000: Admin server listening on port 3001
09/May/2025:10:47:43 +0000: Attempting to connect to the database...
09/May/2025:10:47:43 +0000: Listening on port 3000
09/May/2025:10:47:43 +0000: Listening for notifications on the "pgrst" channel
09/May/2025:10:47:43 +0000: Successfully connected to PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
09/May/2025:10:47:43 +0000: Config reloaded
09/May/2025:10:47:43 +0000: Schema cache queried in 4.9 milliseconds
09/May/2025:10:47:43 +0000: Schema cache loaded 12 Relations, 13 Relationships, 3 Functions, 0 Domain Representations, 4 Media Type Handlers
09/May/2025:10:51:56 +0000: Starting PostgREST 12.1...
09/May/2025:10:51:56 +0000: Admin server listening on port 3001
09/May/2025:10:51:56 +0000: Attempting to connect to the database...
09/May/2025:10:51:56 +0000: Listening on port 3000
09/May/2025:10:51:56 +0000: Listening for notifications on the "pgrst" channel
09/May/2025:10:51:56 +0000: Successfully connected to PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
09/May/2025:10:51:56 +0000: Config reloaded
09/May/2025:10:51:56 +0000: Schema cache queried in 7.0 milliseconds
09/May/2025:10:51:56 +0000: Schema cache loaded 12 Relations, 13 Relationships, 3 Functions, 0 Domain Representations, 4 Media Type Handlers
09/May/2025:10:53:56 +0000: Starting PostgREST 12.1...
09/May/2025:10:53:56 +0000: Admin server listening on port 3001
09/May/2025:10:53:56 +0000: Listening on port 3000
09/May/2025:10:53:56 +0000: Attempting to connect to the database...
Assertion failed: *(&once->n) != 4 (threads.c: k5_once: 564)
09/May/2025:10:53:58 +0000: Starting PostgREST 12.1...
09/May/2025:10:53:58 +0000: Admin server listening on port 3001
09/May/2025:10:53:58 +0000: Listening on port 3000
09/May/2025:10:53:58 +0000: Attempting to connect to the database...
09/May/2025:10:53:58 +0000: Successfully connected to PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
09/May/2025:10:53:58 +0000: Listening for notifications on the "pgrst" channel
09/May/2025:10:53:58 +0000: Config reloaded
09/May/2025:10:53:58 +0000: Schema cache queried in 3.8 milliseconds
09/May/2025:10:53:58 +0000: Schema cache loaded 12 Relations, 13 Relationships, 3 Functions, 0 Domain Representations, 4 Media Type Handlers
09/May/2025:10:57:06 +0000: Starting PostgREST 12.1...
09/May/2025:10:57:06 +0000: Admin server listening on port 3001
09/May/2025:10:57:06 +0000: Attempting to connect to the database...
09/May/2025:10:57:06 +0000: Listening on port 3000
09/May/2025:10:57:06 +0000: Listening for notifications on the "pgrst" channel
09/May/2025:10:57:06 +0000: Successfully connected to PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
09/May/2025:10:57:06 +0000: Config reloaded
09/May/2025:10:57:06 +0000: Schema cache queried in 4.4 milliseconds

Not sure if that failed assertion are causing this or what.

@empz empz added the bug Something isn't working label May 9, 2025
@empz
Copy link
Author

empz commented May 9, 2025

This is becoming extremely frustrating to the point I can't even use it. I've tried everything. Destroying the containers and re-pulling all images, restarted computer, upgraded everything to latest version.

This thing keeps crashing, constantly, and I need to work!

Assertion failed: destructors_set[keynum] == 0 (threads.c: krb5int_key_register: 353)

@w3b6x9 w3b6x9 transferred this issue from supabase/supabase May 9, 2025
@Hallidayo
Copy link

Hi, I've moved this issue over from the supabase repo

@empz
Copy link
Author

empz commented May 9, 2025

Not sure what else I can provide to help you replicate the issue. It's definitely a weird one...

@empz
Copy link
Author

empz commented May 9, 2025

09/May/2025:16:35:44 +0000: Listening on port 3000


Assertion failed: *(&once->n) != 4 (threads.c: k5_once: 564)


09/May/2025:16:35:47 +0000: Starting PostgREST 12.1...


09/May/2025:16:35:47 +0000: Admin server listening on port 3001


09/May/2025:16:35:47 +0000: Attempting to connect to the database...


09/May/2025:16:35:47 +0000: Listening on port 3000


Assertion failed: *(&once->n) != 4 (threads.c: k5_once: 564)


09/May/2025:16:35:48 +0000: Starting PostgREST 12.1...


09/May/2025:16:35:48 +0000: Admin server listening on port 3001


09/May/2025:16:35:48 +0000: Attempting to connect to the database...


09/May/2025:16:35:48 +0000: Listening on port 3000


Assertion failed: *(&once->n) != 4 (threads.c: k5_once: 564)


09/May/2025:16:35:50 +0000: Starting PostgREST 12.1...


09/May/2025:16:35:50 +0000: Admin server listening on port 3001


09/May/2025:16:35:50 +0000: Attempting to connect to the database...


09/May/2025:16:35:50 +0000: Listening on port 3000


Assertion failed: *(&once->n) != 4 (threads.c: k5_once: 564)


09/May/2025:16:35:54 +0000: Starting PostgREST 12.1...


09/May/2025:16:35:54 +0000: Admin server listening on port 3001


09/May/2025:16:35:54 +0000: Attempting to connect to the database...


09/May/2025:16:35:54 +0000: Listening on port 3000


Assertion failed: *(&once->n) != 4 (threads.c: k5_once: 564)


09/May/2025:16:35:59 +0000: Starting PostgREST 12.1...


09/May/2025:16:35:59 +0000: Admin server listening on port 3001


09/May/2025:16:35:59 +0000: Attempting to connect to the database...


09/May/2025:16:35:59 +0000: Listening on port 3000


Assertion failed: (*mecherror_cmp)(r, pair->r) != 0 (errmap.h: mecherrmap_add: 197)

@sweatybridge
Copy link
Contributor

It looks like our latest version is on 12.2.12 and there's already work to move it to 13.0.

I suspect you are running with an old version of PostgREST version locally. Could you try rm supabase/.temp/rest-version before running supabase start again?

@empz
Copy link
Author

empz commented May 12, 2025

It looks like our latest version is on 12.2.12 and there's already work to move it to 13.0.

I suspect you are running with an old version of PostgREST version locally. Could you try rm supabase/.temp/rest-version before running supabase start again?

Yes, I figured that out a few minutes ago. I though updating Supabase CLI and removing all containers should use the right versions, but I guess that's not the case. Maybe add a warning on the CLI if the versions stored in .temp do not match the ones that the CLI should be using?

Thanks

@empz empz closed this as completed May 12, 2025
@sweatybridge
Copy link
Contributor

Maybe add a warning on the CLI if the versions stored in .temp do not match the ones that the CLI should be using?

Well, the purpose of temp version is to sync up your local versions to match your remote project. So they are actually expected to be different from cli defaults after running supabase link command.

What you can do is to update your remote project (by restarting) so it's running the latest version of postgrest.

@empz
Copy link
Author

empz commented May 12, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants