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.
73
questions
45
votes
3
answers
58k
views
How do you calculate mysql max_connections variable?
How do you calculate mysql max_connections ?
What do you take into consideration ?
35
votes
3
answers
155k
views
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 ...
25
votes
2
answers
64k
views
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 ...
24
votes
1
answer
40k
views
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 ...
19
votes
1
answer
154k
views
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 '...
16
votes
2
answers
36k
views
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 ...
13
votes
1
answer
8k
views
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 ...
11
votes
1
answer
5k
views
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 ...
10
votes
2
answers
21k
views
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 ...
10
votes
1
answer
44k
views
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 ...
9
votes
3
answers
3k
views
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 ((...
8
votes
1
answer
8k
views
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)
...
8
votes
1
answer
22k
views
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. ...
7
votes
2
answers
10k
views
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, ...
6
votes
2
answers
41k
views
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 ...
5
votes
1
answer
1k
views
Does the mysql parameter "max_connections" apply for unix socket connections?
The documentation does not specify if max_connections apply only to TCP connections.
The way it is said, it looks like it does apply for any kind of connection, but I'd like to be sure because ...
5
votes
1
answer
15k
views
How many users are supported on SQL Server 2012 Express?
I would like to say that i have gone through some of the sql blog and MSDN BOL, but still there is some confusion in mind like.
The limitation of SQL Server 2012 Express is 10 GB. It is the ...
4
votes
3
answers
10k
views
Configuring the max_connections setting in MySQL
I've gone through a number of docs and forums but can't quite find the right answer for how to determine the number of maximum connections I should set.
I tried using MySQLTuner, that gave me:
...
4
votes
1
answer
3k
views
Is it normal to constantly have 30+ connections to ‘master’ database in MS SQL Server 2012?
In troubleshooting why I was seeing so many connections to one of our internally used databases in SQL Server 2012.
A query I found online that had been helpful to me was this:
SELECT DB_NAME(sP....
4
votes
2
answers
19k
views
MySQL PDO Cannot assign requested address
Can someone help me with this error?
[08-Apr-2013 17:44:08 Europe/Berlin] PHP Warning: PDO::__construct(): [2002]
Cannot assign requested address (trying to connect via tcp://****:3306) in
/...
4
votes
1
answer
2k
views
Named pipes connection closed when subjected to load
We're hosting a service where we have a messaging service. When a message arrives, it checks which subscribers it should be sent to by connecting to the database, and querying the subscriptions table....
4
votes
0
answers
1k
views
How to properly configure pgBouncer transaction level pooling?
What is a good way to determine the number of available transaction connections when using pgBouncer to pool database connections? Also, how should I determine the number of max_connections and ...
3
votes
1
answer
544
views
Confused about maximum connections in PostgreSQL
I am building a web application and I using PostgreSQL as the database management system.
The following page details the maximum connections setting:
https://www.postgresql.org/docs/9.5/static/...
3
votes
1
answer
7k
views
Maximum concurrent connections to SQL Server Express 2017 installed on Windows Server 2016 Essentials
If I install SQL Server Express 2017 on Windows Server 2016 Essentials, what is the maximum number of users that will be able to connect concurrently across the network to the SQL Server Express ...
2
votes
2
answers
3k
views
Are problems with parallelism more common today? What issues can arise from parallelism?
This is a very general question so I don't give much specific information. I am more interested in parallelism and its possible drawbacks. Generally I am all for parallelism as something useful and ...
2
votes
2
answers
8k
views
Too many TIME_WAIT connections in PostgreSQL
I am using PostgreSQL 9.0 on Centos 5.7 Final.
At any given there are around 1,500-2,200 connections open for PostgreSQL on port 5432 which are in TIME_WAIT state.
I have a feeling this is not good.
...
2
votes
2
answers
390
views
Does having a specific database for each user in a web app good design?
I have a client who's insisting in a SaaS application to have one table for all users, and then for each user to have a separate database on which we perform CRUD operations based on an authentication ...
2
votes
1
answer
3k
views
PostgreSQL Correlation Between "max_connections" and "numbackends"
I'm trying to figure out why the field numbackends in pg_stat_database never goes above 16 (and often stays the same even after a restart).
I have max_connections set to 100 and ...
2
votes
1
answer
10k
views
Mysql not closing connections
I have a Java application that configured with a connection pool. I have ensured that the application terminates the connections properly.
However when I run this command on mysql command line -
...
2
votes
1
answer
1k
views
Optimize the number of connections of the connection pool and MySQL
We are using Oracle Cloud's Ampere A1 instance consisting of 4 OCPUs (equivalent to 4 vCPUs) and 24GB of usable memory on Oracle Linux 7.9.
On the server is running an java game server and a web ...
2
votes
1
answer
1k
views
MySQL max_connections setting - per client or global?
So I just need to clear this up.
For a test, I set max_connections=10 in my.cnf.
I then ran 10 scripts concurrently that each take over 20 seconds to finish.
I monitored my threads and noticed that ...
2
votes
1
answer
8k
views
pt-heartbeat showing "Host is blocked because of many connection errors"...but connections are well under limit
I'm running MySQL in a master-slave configuration. pt-heartbeat is showing "Host is blocked because of many connection errors"...but connections are well under limit (limit is 600 connections, MySQL ...
2
votes
3
answers
5k
views
Can we restrict the number of connections to a database in SQL Server?
I have a database on SQL Server. My web application contacts this database. Is there a way in which I can restrict the number of connections to this database through some settings on the SQL Server?
2
votes
1
answer
55
views
Database connections and related issues?
If my tomcat is configured to accept 100 incoming requests concurrently, how many connections should be present in DB connection pool ? In other words, if there a known optimal ratio of number of ...
1
vote
1
answer
14k
views
Postgres: "show max_connections;" output a different value from postgresql.conf file
I'm trying to increase the max_connections value from the config file, but the show max_connections; command always shows 100.
I restarted postgres after changing the conf file,
I have modified the ...
1
vote
1
answer
2k
views
How many pool connection size should be set for a 1000 users Jira system?
For a Jira system, if use Jira's default connection configuration as below:
<?xml version="1.0" encoding="UTF-8"?>
<jira-database-config>
<name>defaultDS</name>
<...
1
vote
1
answer
75
views
MySQL max_connctions+1
I experienced an incident that my connections are full. Even I as an administrator I cannot log to MySQL due to "too many connections.". Does anybody knows how to setup this max_connections+1? I use ...
1
vote
1
answer
774
views
too many connection error mysql: how to calculate max_connections
how to calculate this values to get the best results to resolve this error "too many connection error mysql" and make my API faster
in mysql
wait_timeout = ??
max_connections = ??
...
1
vote
2
answers
2k
views
multiple connections on MySQL database with no users on httpd
My database seems to have many open connections despite having no users on httpd.
mysql> SHOW PROCESSLIST;
+-------+----------+--------------------+---------------------+---------+------+-------+--...
1
vote
1
answer
6k
views
mysql fine tuning: open_tables, opened_tables
I'm a novice to database administration and have been depending on forum suggestions and answers to help resolve my database hang ups and too many connections errors; I've managed to reduce the ...
1
vote
1
answer
93
views
max_connections error during restoring PostgreSQL to Local Database
I am facing max_connections error during database restoration on ApsaraDB for PostgreSQL in a local database.
I am using below mentioned command for database restoration
\i c:/mydb1.sql
1
vote
1
answer
4k
views
Show processlist / Max concurrent connections seem to max out at 131
When I put my database under a load test (basically just a basic write and basic read from our app), and run show processlist; in the middle of it, there is always 131 rows in the set and that's it. I'...
1
vote
1
answer
438
views
Sudden MySQL connection issue
We have almost 60 network guys working via a proxy server, developing on one Linux-based in-house server.
Suddenly, it is saying to everyone:
Warning: mysql_connect() [function.mysql-connect]:
Too ...
1
vote
0
answers
3k
views
postgres 11: remaining connection slots are reserved for non-replication superuser connections
I've run into the following problem. From time to time, my app receives remaining connection slots are reserved for non-replication superuser connections from postgres. It lasts for quite noticeable ...
1
vote
1
answer
815
views
max_connections set to 500, Max_used_connections never go over 151 [closed]
I have this set in the mysql config file, rebooted, seems to be correct.
SHOW VARIABLES LIKE "max_connections";
+-----------------+-------+
| Variable_name | Value |
+-----------------+----...
1
vote
0
answers
1k
views
How to increase max_connections in Postgresql-9.2
I need to increase production Postgresql-9.2 max_connections parameter from current 1000 to 3000.
Used PGTune service to get the values and updated accordingly to the postgresql.conf file and /etc/...
1
vote
0
answers
574
views
Is sp_getapplock recommended for long running locks (> 10 minutes)?
I'm trying to get rid of a Redis dependency in our application.
We notice that is worse for our uptime to have a dependency on both SQL and Redis, above the performance benefits Redis would give us.
...
1
vote
0
answers
295
views
Oracle Max Open Cursors - What does table_ mean?
We're encountering a lot of maximum open cursors recently so we ran a query to check for the maximum open cursors.
The query to check for open cursors looks something like this
select * from v$...
1
vote
4
answers
881
views
What is the meaning of "available RAM" for calculating MySQL max_connections
The question was asked previously, "how do I calculate MySQL max_connections" and this was the answer:
max_connections = (Available RAM - Global Buffers) / Thread Buffers
Since I don't have enough ...
0
votes
3
answers
3k
views
Determine theoretical max connections for MariaDB
I want to upgrade the ram our MariaDB server (10.1.25-MariaDB-1~xenial) to handle more connections.
I have been determining the max connections mostly based on this article which suggests to use this ...