Skip to main content

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.

Filter by
Sorted by
Tagged with
2 votes
0 answers
76 views

AWS RDS PostgreSQL -

We have an AWS RDS PostgreSQL (v14.10) instance running on a db.t3.micro instance. Randomly throughout the day (some days more than others), our .NET Core application starts failing with the following ...
gwin003's user avatar
  • 121
0 votes
0 answers
38 views

PostgreSQL: pg_settings view's "pending_restart" not showing correct value

I have seeing a strange behaviour with PostgreSQL13 pg_settings system view. I tried updating max_connections using SET command and left without a restart. But if I query from the same session or any ...
goodfella's user avatar
  • 393
0 votes
0 answers
52 views

Intermittent AWS RDS Connection Spikes Causing Production DB Outages

I'm new to AWS, and we're using a db.r7g.2xlarge instance running MySQL with default configurations. Typically, CPU usage and database connections are normal until "something" causes the DB ...
Mohamed Akram's user avatar
1 vote
0 answers
237 views

Aurora RDS - difference between ConnectionAttempts and DatabaseConnections

So I have read this a few times about these two metrics: ConnectionAttempts and DatabaseConnections. Based on the above, is RDS rejecting lots of connections? Here are the graphs of these two metrics. ...
Abs's user avatar
  • 11
0 votes
0 answers
431 views

PostgreSQL: Parallel Workers Error

For the last two days one of our query causing parallel workers related errors as below, 2024-01-04 13:58:45.988 CST,"user_a","testdb",108428,"10.0.0.1:46480",6596490c....
goodfella's user avatar
  • 393
2 votes
2 answers
810 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 ...
Arka-cell's user avatar
  • 123
0 votes
1 answer
398 views

How to restrict the number of connections to database from particular IP address on Db2 database?

On Db2 v11.5.8.0 Linux x86_64 database every few months some application opens up a lot of connections and it free them up pretty quickly like in 10 mins. I assume it has to be fat client application ...
folow's user avatar
  • 401
0 votes
1 answer
682 views

I'm Getting MySql max_connect_error, but Max_used_connections shows it didn't reach the limit

From time to time, I'm getting an error "mysqli_connect(): (HY000/1203): User already has more than 'max_user_connections' active connections." I checked the MySQL max_connection variable, ...
Chane Rubin's user avatar
2 votes
1 answer
2k 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 ...
Tần Quảng's user avatar
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 ...
Vadim Samokhin's user avatar
0 votes
2 answers
772 views

Limiting and queueing the database connections

In mariaDB, is it possible to do something like this? limit the number of connections (like in mysql, as explained in this SO answer) set up a queue for all the other connection attempts, and avoid ...
FiddlingAway's user avatar
0 votes
1 answer
443 views

MySQL server connection is hitting limit of magical number 4832

Have been monitoring mysql server for year, I notice the mysql database max_used_connections cannot get pass 4832. Once hitting 4832, MySQL begins to show slowness, while the loads/cpu usage/memory ...
neobie's user avatar
  • 141
1 vote
1 answer
944 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 | +-----------------+----...
ericl's user avatar
  • 11
0 votes
1 answer
1k views

mysql: ERROR 1040 (HY000): Too many connections and can't restart because of Error: 28 (No space left on device) [closed]

My app crashes because there are too many connections open and mysql does not make me log in as root showing the same problem. After restarting mysql, it does not restart because of no space on disk
Domenico Scalera's user avatar
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 ...
whoacowboy's user avatar
0 votes
1 answer
2k views

Concerned about hitting max_connections with many IDLE State connections

I am using PostgreSQL 9.5 and we have max_connections set to 200 in our postgresql.conf file. We have 2 apps server running java apps which are load balanced. When we run our tests via JMETER, I run ...
rdbmsNoob's user avatar
  • 459
0 votes
1 answer
690 views

Mysql - when increase 'max_connections', what other paramters to adjust accordingly?

I know some memory / cache / open file related params should be adjusted accordingly. But after searching for quite a while, didn't found a comprehensive guide. Say, mysql 8 is in use, running on ...
Eric's user avatar
  • 253
5 votes
1 answer
22k 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 ...
Khalil Meg's user avatar
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/...
JineshJK's user avatar
0 votes
2 answers
1k views

Cannot lower/figure out per connection mariadb memory usage

I'm running a small mariadb DB to serve some websites and monitoring tools (nexctloud, wordpress and icinga2). The machine that works as a DB server also run an elasticsearch + graylog instance so I ...
ebiagi's user avatar
  • 3
8 votes
1 answer
25k 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. ...
G_Hosa_Phat's user avatar
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> <...
rawmain's user avatar
  • 349
2 votes
0 answers
676 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. ...
Dirk Boer's user avatar
  • 385
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 ...
user183592's user avatar
4 votes
3 answers
11k 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: ...
user3783243's user avatar
0 votes
0 answers
2k views

Is it possible to make thosunds of concurrent transactions even if the max_connections is set to 100 in Postgres?

This is maybe a dummy queestion but I couldn't understand to have thousands of concurrent transactions in a database even if the max_connections=100. Definition of max_connections from postgres ...
H.Ç.T's user avatar
  • 185
0 votes
1 answer
2k views

MySQL stalls and strange threads/connections behavior is observed

We have a MySQL instance which most of the time works just fine. From time to time, however, we observe strange behavior. What happens is that suddenly MySQL connections reach the limit (currently set ...
Daniel Kanchev's user avatar
15 votes
1 answer
9k 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 ...
k4ppa's user avatar
  • 253
0 votes
2 answers
618 views

MySQL 5.7 intermittent max connections errors

I’m having a problem with MySQL 5.7 with « too many connections » causing services crashes. The max_connections system variable is set at 1000 and on average there are +/- 250 sessions/thread, so it’s ...
Shawn_M's user avatar
3 votes
1 answer
8k 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 ...
Pay it forward's user avatar
1 vote
1 answer
98 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
user avatar
1 vote
0 answers
304 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$...
grassbl8d's user avatar
  • 477
0 votes
2 answers
228 views

WARN max_connections from pt-variable-advisor - what to configure for DBaaS?

Our VM configuration (hosted on Vmware) # cat /proc/cpuinfo |grep "cpu cores" | awk -F: '{ num+=$2 } END{ print "cpu cores", num }' cpu cores 32 # free -h total used free ...
Sybil's user avatar
  • 2,558
10 votes
2 answers
23k 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 ...
TrungDQ's user avatar
  • 199
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....
Rob V's user avatar
  • 375
3 votes
1 answer
627 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/...
Pura Vida's user avatar
12 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 ...
Eric Jensen's user avatar
-1 votes
1 answer
123 views

systems hangs after specific time

I am having 2 applications (Java and PHP). Both are sharing same DB Server. After specific time, both systems stops working due to "Too many connections". I tried so many settings (increased ...
Kanchan's user avatar
0 votes
1 answer
1k views

Pooler (pgbouncer) + MasterDB + Slaves

During a spike, my connections go from 30 to over 140, as you can see below: I'm willing to set-up a pooler like pgbouncer, but have some questions as my scenario is not that easy: 1 Load Balancer ...
user avatar
0 votes
1 answer
2k views

max_allowed_packet after mysql restart

I want to set max_allowed_packet parameter in runtime. The SET GLOBAL max_allowed_packet = 16777216 works for new connections, but after database server restart, it has previous value. Can value of ...
shk's user avatar
  • 149
0 votes
2 answers
2k views

ulimit 'open files' and MySQL max_connection

When running mysql on SSD, does max_connections, if set more than the kernel's ulimit open files, be limited to the kernel's limit? My understanding is that if the kernel's ulimit open files is 1024 ...
The Georgia's user avatar
25 votes
2 answers
65k 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 ...
sebeid's user avatar
  • 1,401
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 ...
Md Haidar Ali Khan's user avatar
2 votes
1 answer
58 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 ...
JavaDeveloper's user avatar
2 votes
1 answer
2k 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 ...
Luka's user avatar
  • 123
16 votes
2 answers
39k 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 ...
Will Hughes's user avatar
0 votes
3 answers
92 views

Alternating usernames while connecting to mysql database

My server has a max_connections value of 400 and a max_user_connections of 250. Since I am always connecting with the same user name, my effective max_connections is 250 instead of 400. To solve this, ...
danielb's user avatar
  • 103
1 vote
1 answer
77 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 ...
Darwin Cabiling's user avatar
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 ...
Neil McGuigan's user avatar
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 ((...
Jan Żankowski's user avatar