NeonDbError: connection closed

You guys changed anything recently? Now I’m getting this error everytime I connect while my primary branch is “idle”. When it’s not idle it works fine. Also, if I refresh then it will work and no longer be idle but the first connection will always cause this error.

Running into the same issue at the moment, getting “terminating connection due to administrator command” randomly after the branch has been “idle” for a while.

Hey @blechatellier and @Apestein, sorry to hear that you’re running into an issue. Do you mind creating a support ticket so we can take a closer look?

You can do so by clicking on the “Support” button from the sidebar

@Mahmoud thanks, I’m currently troubleshooting it with support.

The initial feedback I got is that this is a “normal” behaviour when a database goes idle. I find this really odd as this would defeat the purpose of using serverless if it always throws an error on first connection after a database goes idle.

I’m now using the pooler connection and haven’t seen the error so far, so hopefully this was related with the pool running out of connections.

You have a different problem then, mine specifically says “NeonDbError: connection closed”.

Sorry, but I don’t see it, could you provide a screenshot?

You get a response yet?

Taking a look at some case history, I only see this specific error reported with drizzle, but that could be coincidental. I suspect, from the error, this is coming from the proxy.
You are likely getting past authentication, but the connection to the database endpoint is slow.

This issue might be specific to your endpoint (or region if there is an allocation error).
If you want to share your endpoint, we can take a look at the logging.
I would recommend doing so in a support ticket so we can go though this as quickly as possible.