Server error #12547
Unanswered
22Jean-Paul
asked this question in
Help Wanted!
Server error
#12547
Replies: 2 comments 3 replies
-
Your postgres server is probably unable to service the connections. I cannot be 100% sure as you have not posted the entire error. |
Beta Was this translation helpful? Give feedback.
3 replies
-
I will make a small addendum about max connections (for any DB server), the reason that max_connections exists is because there are megabytes of RAM needed per connection for buffering the incoming query (which could contain large blobs), sorting an outgoing response, etc. and depending on how big those buffers are and how much RAM your DB server has, that can start to add up and it's better to reject an incoming connection than crash trying to allocate RAM that you don't have to service a connection that it accepts but can't actually handle.
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: Abhimanyu Saharan ***@***.***>
Sent: Wednesday, May 10, 2023 7:08 AM
To: netbox-community/netbox ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [netbox-community/netbox] Server error (Discussion #12547)
This error message indicates that there are no available database connections because all the available slots have been reserved for superuser connections. The PostgreSQL database has a limited number of connections that can be made at the same time. By default, the maximum number of connections is set to 100.
When a superuser connects to the database, it reserves one of the available connection slots, and it remains reserved until the connection is closed. When all the available connection slots are reserved, no new connections can be made, and this error occurs.
To resolve this issue, you can try one or more of the following solutions:
1. Increase the maximum number of connections in the PostgreSQL configuration file (postgresql.conf). You can increase the value of the "max_connections" parameter to allow more connections.
2. Close any idle connections that are no longer needed. You can use the "pg_stat_activity" view to identify idle connections and terminate them using the "pg_terminate_backend" function.
3. Grant the necessary privileges to other users or roles so that they can connect to the database without requiring superuser privileges. This will help to reduce the number of superuser connections and free up more connection slots.
4. If you have a replication setup, make sure that the replication connections are using the replication user instead of a superuser account. This will allow you to reserve the available connection slots for regular user connections.
Once you have made the necessary changes, restart the PostgreSQL server to apply the changes.
—
Reply to this email directly, view it on GitHub<#12547 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM7D5LGBNXDVLXLOC7LXFOALLANCNFSM6AAAAAAX4TWKUU>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Netbox community,
When trying to create a new device, I got the following error message:
What could be the cause?
How can I correct this?
Thank you in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions