Questions tagged [max-connections]

"How many people can log in at once?". There is a limit to how many concurrent client sessions a database service will serve. This may be governed by software configuration or hardware limitation.

Questions with this tag may refer to either the maximum connections a service will accept (under load or by configuration) OR the limits on the number of connections allowed to a given pool.

Some useful references:

75 questions
45
votes
3 answers

How do you calculate mysql max_connections variable?

How do you calculate mysql max_connections ? What do you take into consideration ?
Gabriel Solomon
  • 985
  • 2
  • 10
  • 13
37
votes
3 answers

psql: FATAL: sorry, too many clients already

I am suddenly getting this error when either trying to access the website that uses the postgresql database, or even when using the psql utility or pgadmin3. My database is set to handle 150 maximum connections: # SHOW max_connections; …
JohnMerlino
  • 1,939
  • 5
  • 20
  • 21
25
votes
2 answers

Max number of user connections

In SQL Server 2012 Standard edition, I know that the max number of user connections is 32,767. What should I do as a DBA if I am heading towards this number? Currently there are 30,000 user connections, and this number is expected to increase.
sebeid
  • 1,415
  • 2
  • 17
  • 29
24
votes
1 answer

What limits the number of connections?

As per https://devcenter.heroku.com/articles/heroku-postgres-legacy-plans the connection limit is 500 As per https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server "Generally, PostgreSQL on good hardware can support a few hundred…
Neil McGuigan
  • 8,653
  • 5
  • 42
  • 57
19
votes
1 answer

How to get rid of "maximum user connections" error?

I am using MySQLi for my webapp but whenever I want to visit some particular page, I get mysqli_connect() [function.mysqli-connect]: (42000/1203): User ***_user already has more than 'max_user_connections' active connections. I tried already to…
ahmed
  • 293
  • 1
  • 2
  • 4
16
votes
2 answers

View active MySQL connections per user

I need a query that will give me the active or open number of connections to a certain database for a certain user. I have been searching for hours and have come up with nothing so far. I am close, so here is what I have tried. SHOW STATUS WHERE…
Will Hughes
  • 161
  • 1
  • 1
  • 3
15
votes
1 answer

What is effective spindle count

The PostgresSQL wiki suggest a rule for find the optimal amount of DB connection pool size. amount = ((core_count * 2) + effective_spindle_count) But it does not explain what the effective spindle count is and how can I find this value.
k4ppa
  • 253
  • 2
  • 5
12
votes
1 answer

How can I find the source of postgresql per-connection memory leaks?

I'm using postgresql 9.5.4 on amazon RDS with ~1300 persistent connections from rails 4.2 with "prepared_statements: false". Over the course of hours and days, the "Freeable Memory" RDS stat continues to go down indefinitely but jumps back up to a…
Eric Jensen
  • 291
  • 3
  • 8
10
votes
1 answer

Why does max_used_connections status not get refreshed automatically once it reaches max_connections, even though the Threads_connected falls down

I always wonder, why does the max_used_connections value not come down, once it reaches the peak value of max_connections? I always flush the status and bring down this value to avoid DB connection refused errors and warning messages in the error…
10
votes
2 answers

What reason could cause AWS RDS connections to spike

It's my first time using RDS on AWS, I use a t2.medium instance running MySQL Aurora with default configs. The CPU usage and DB connections is quite normal until "something" happens, which causes the DB connections go all the way up to its maximum…
TrungDQ
  • 199
  • 1
  • 1
  • 7
9
votes
3 answers

How to understand the PostgreSQL discrepancy between connection pool recommendation ((2 * n_cores) + n_disks) and support for 100s of connections?

From PostgreSQL docs: Number of Database Connections -> How to Find the Optimal Database Connection Pool Size for optimal throughput the number of active connections should be somewhere near ((core_count * 2) + effective_spindle_count) Tuning…
8
votes
1 answer

What are user connections - when are the created and destroyed?

We've been getting an intermittent error on out site: Warning: mysql_connect() [function.mysql-connect]: User '557574_prod' has exceeded the 'max_user_connections' resource (current value: 10) Which prevents the site from being accesses &…
JIStone
  • 869
  • 2
  • 8
  • 16
8
votes
1 answer

FATAL 53300: Remaining connection slots are reserved for non-replication superuser connections

I have a PostgreSQL 12.1 database system (I'll refer to it as PGSQL) running on a remotely hosted VM server (Windows Server 2019). We upgraded the server OS and PGSQL a couple of months ago. Everything has been running more-or-less normally since…
G_Hosa_Phat
  • 445
  • 2
  • 5
  • 16
7
votes
2 answers

Does PgBouncer create a separate pool for every database config entry?

If I set up a pgbouncer.ini config file with several database entries, does pgBouncer create a separate pool for each one? I would think so, but have not been able to confirm this. For example, with something like this: [databases] db1 = ... db2…
Juan Carlos Coto
  • 1,588
  • 5
  • 18
  • 25
6
votes
2 answers

How can I determine the maximum possible number of threads?

What factors determine the maximum possible number of threads mysqld will create? I only care about consideration for mysql and not limitations that may be imposed by the operating system. Further, I only care about Linux, though if you want to…
Preston
  • 206
  • 1
  • 2
  • 7
1
2 3 4 5