Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [connection-pooling]

In client applications, a connection pool is a cache of connections maintained so that the connections can be reused when future requests to the resource are required. Many DBMSes also support server-side connection-pooling allowing them to service more concurrent clients than they have server-side processes or threads servicing them.

Filter by
Sorted by
Tagged with
0 votes
1 answer
3k views

Load Balancing PG Bouncer With HA Proxy

I have a server with two instances of PG Bouncer running on different ports. Both are using session mode to pool. I set up HA Proxy to load balance incoming connections between these two processes to ...
0 votes
1 answer
18 views

Pgbouncer: Can pgbouncer take reserve_pool_timeout in milliseconds?

Is it possible to specify pgbouncer reserve_pool_timeout in milliseconds, I have tried specifying it with '500 ms' but throwing an error and then tried specifying 0.5, this time no error but unable ...
0 votes
0 answers
18 views

Does Analysis Services provide connection pooling

We know that when creating a SQL connection, for example: using (SqlConnection sqlConn = new SqlConnection(conString)); we are actually not always creating a new connection to the server, but rather ...
0 votes
1 answer
22 views

PostgreSQL: Database Layer Pooling v/s Application Layer pooling

I would like to have some recommendations about connection pooling in PostgreSQL. We already have connection pooling using Pgbouncer behind an Azure LB. The pgbouncer itself is working pretty much ...
4 votes
2 answers
3k views

Shared connection pool in SQL Server and prevention of cross-database queries

Microsoft recommends that a shared connection pool should be used when running e.g. a SaaS software with one database per customer but with a shared codebase to prevent pool fragmentation. When taking ...
0 votes
1 answer
58 views

Select query with 90+ parameters intermittently 20x slower on RDS PostgreSQL instance when using connection pool

I'm running a select statement on a postgresql table (on an RDS instance) in order to sum up values across 2 mil rows. The select statement has about 100 parameters (mostly different countries we want ...
0 votes
1 answer
165 views

pooler error: query_wait_timeout in pgbouncer logs

I am getting pooler error: query_wait_timeout for different databases in the pgbouncer log 6 to 7 times a day . When the error occurs for masterdata database , it gives me a timeout in the ...
2 votes
2 answers
3k views

SSMS How do I open a new Query Window using Same Connection Instance of current Window

Coming from Oracle I have discovered that SSMS connects slightly different than Oracle's SQL Developer. Oracle you click ONE connection and then all tabs you open then use that Connection. SSMS ...
0 votes
2 answers
568 views

PostgreSQL: Pgbouncer authentication

We are using authentication file mode in pgbouncer. The authentication part of Pgbouncer is so confusing. Would be helpful if anybody can throw some light on my below queries. Are Pgbouncer ...
0 votes
1 answer
174 views

PostgreSQL driven by SQLAlchemy - Release Savepoint Idle in Transaction

While running PostgreSQL 13.12 (occurs in several versions of PG11/PG13) using SQLAlchemy 1.3, we are occasionally hitting issues where increased concurrency leaves certain transactions (and their ...
2 votes
1 answer
60 views

Is calling a database class on app creation correct for pooling?

Start doadmin.Database().__init__() Class class Database(object): connection = None cursor = None def get_c(self): return self.cursor def __init__(self): if Database.connection is None: ...
0 votes
2 answers
530 views

Should I re-use a database connection or create new collections while closing old ones? social media

this is for a social media with constant requests for new posts, checking is someone is following, getting comments, ect. i wont specify which language as it doesnt really matter but, currently in my ...
7 votes
2 answers
2k views

Verifying connection pooling server side with CONTEXT_INFO on

I'm working with a 3 tiered application, Microsoft Dynamics AX, where the middle tier maintains connections to a SQL Server. Several clients connect to this middle tier server. The middle tier server ...
0 votes
1 answer
137 views

Estimating a max poolsize in azure postgres

In this article , I found the formula to get an estimate of the max poolsize value: connections < max(num_cores, parallel_io_limit) / (session_busy_ratio * avg_parallelism) now, ...
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
5k views

High Number of Connections

The below query tells me there is a total of 520 connections to our SQL Server database. Status of all is 'sleeping' except for 4 connections. The login_time goes back to 2 days ago on some ...
2 votes
1 answer
2k views

Why does my application have over 20,000 idle (sleeping) connections in SQL Server?

I have an analytics application running with .NET 6 in a Linux Kubernetes container. It receives http messages and logs them. For my data layer, I'm using the Microsoft.Data.SqlClient v4.1.0 library, ...
1 vote
2 answers
81 views

How can I create a brand new alarm based on a verification not listed by default on SQL Server?

I want to create an alert like the ones from Brent Ozar's How to Configure SQL Server Agent Alerts, but I couldn't find a message related to the error I want to monitor on sys.messages as the ...
1 vote
2 answers
6k views

Python Postgres psycopg2 ThreadedConnectionPool exhausted

I have looked into several 'too many clients' related topic here but still can't solve my problem, so I have to ask this again, for me specific case. Basically, I set up my local Postgres server and ...
0 votes
1 answer
89 views

Postgresql current_timestamp and ODBC Conection pooling [closed]

Current_timestamp returns the time of the beginning of the transaction, which is the time of the end of the previous transaction. But what happens for connection pooling? The commit may have happened ...
0 votes
0 answers
1k views

The client was unable to reuse a session with SPID 720, which had been reset for connection pooling. The failure ID is 1

I have researched a lot and there is very little information especially when you see it with Failure ID = 1, which is default code. It suddenly started appearing on our PROD servers. Microsoft SQL ...
13 votes
2 answers
5k views

Feasible to have thousands of users in Postgres?

We are creating SAAS where we will at most have 50.000 customers. We are considering creating a user in the Postgres database for each customer. We will map each user that logs into our service to a ...
0 votes
0 answers
54 views

SQL connections to java applications

I have an MSSQLServer2000 database that seems to have been working just fine until today. The DB connects to a java application on a remote server that passes the database data (login credentials, ...
5 votes
2 answers
13k views

Cost of Increasing max pool size in SQL Server

We have a public front website that run fine most of the time. But we sometimes experience peaks of connections (like after a mailing campaign) and we were getting error like : Timeout expired. The ...
2 votes
1 answer
2k views

When and why should I reset session in a connection pool?

I am using Python to implement a high speed query push service into a MySQL database. Considering a broad usage of various MySQL elements like temporary tables in stored procedures, when and why ...
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
3 answers
11k views

Connection problem different errors .net application

We have a SQL Server with some relational databases. We have another webserver with applications which communicate with the databases. We have an issue with one of our customers. We get some errors ...
0 votes
2 answers
174 views

Nested Stored Procedure Connections

I have a Stored procedure that simply looks for Imported files through a set of other processes. The main SP runs every 5 mins and looks for new files in a directory and imports them into a staging ...
1 vote
2 answers
25k views

What settings control the maximum number of connections per user in Oracle 12c?

We have some software that is throwing an exception "Pooled connection request timed out" I know the reason for this and i know the fix. I just need to buy some time on the production server until i ...
0 votes
1 answer
991 views

How to reset session context/variables in JDBC pooled connections - MySQL / Oracle

In my application I have multithreads that needs to access database and I am using apache.tomcat.jdbc.pool.DataSource as a JDBC connection pool. In some cases users execute stored procedures that ...
3 votes
2 answers
2k views

Is there a way to prevent "reset role" in PostgreSQL

Is there a way to prevent a user from running "reset role" in PostgreSQL, and thus gaining permission he may not have ? I have an architecture with many databases on a single server. An API connects ...
13 votes
1 answer
11k views

What is the purpose of session pool_mode in pgbouncer?

Since in this mode pgbouncer creates outbound connection for each inbound connection it seems to me that pgbouncer doesn't work as pooler. It's just 1 to 1 mapping. Where am I wrong?
0 votes
2 answers
630 views

PgBouncer on separate server than PostgreSQL

Right now I am hosting PostgreSQLand PgBouncer on the same Linode with 48GB of RAM and 12 Cores. The server gets many short lived connections per second. The server load will increase with time and I ...
1 vote
0 answers
458 views

how to maximize usage of number of databases on a postgres server while limited by connections

We're building a system where ideally we'd give a database per client in a multi-tenant setup. However, although a single Postgres install supports 4,294,950,911 databases on a server, the suggested ...
21 votes
2 answers
39k views

Connection pools being reset with Error: 18056, Severity: 20, State: 46. & Perfmon Counters not showing

We are using SQL Authentication (to reduce the number of connection pools) & .NET 4.0 connection strings to connect to SQL Server Enterprise Edition 2012 SP1 on a Windows 2008 R2 Enterprise Server:...
0 votes
1 answer
405 views

How many operations SQL Server support per connection

I am making a multi threaded application in which I will use a single SQL Server connection and perform select, insert, update and delete. So once my application starts, it will open connection ...
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
668 views

Grouping SQL Server Connections By Connection Pool

In SQL Server 2014 is there a way to group connections by the connection pool that belong to? We are trying to find out if a specific application is leaking connections and hitting the default max ...
2 votes
1 answer
5k views

Is it possible to configure pgbouncer to distribute queries among master and slave?

We have master (write-read) and slave (readonly) Postgres 10 databases. Slave is online replication from master. Now our application (c# webapi) connects to master only directly. We want to execute ...
-1 votes
2 answers
518 views

Is there something similar to PgPool-II for oracle

I am running apps in kubernetes, which for even one app, it may have multiple containers; thus, the jdbc pool won't work. Is there a layer similar to PgPool-II for oracle database? Thanks in advance
3 votes
2 answers
2k views

Sql server sleeping state is increasing using ADO.NET?

We have one live ASP.Net application which is used by around 1000 concurrent users. In this application we have used connection pooling. There are 2 connection string defined in web.config with ...
3 votes
2 answers
640 views

Connection pooling - NodeJS or Database products?

Consider the mysql package. The description covers connection pooling thus, Rather than creating and managing connections one-by-one, this module also provides built-in connection pooling using ...
7 votes
2 answers
4k views

How to handle connection pooling for massive multi-tenancy/multi-schema environment

Here's a quick run down of the situation: We have 1 Schema per customer. We have 2000+ customers. We have 50+ Database servers (with the above schema's distributed unevenly amongst them). We are ...
3 votes
1 answer
671 views

Error creating connection pool for dbid:

We have an application that uses TomCat and Java to receive files and move them to a SQL Server 2012 instance. Previous versions of this software worked just fine. The new release fails on our ...
0 votes
0 answers
529 views

MySQL pooled connections and crontab jobs (not reusing connections)

I have several cron jobs running and the task that cron has to do is execute a file that in turn checks and compares crawled data with data in the database, if it exists then the script ends and if it ...
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 ...
1 vote
1 answer
1k views

Debug Connection Pool Error

I have been getting the below error. System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.InvalidOperationException: Timeout expired. The timeout ...
1 vote
1 answer
2k views

Mysql connection pool set timezone

Service application is nodejs It is using mysql connection pool. Currently, we will plan to sell service to another country What is the best way to set timezone? timezone setting execute, and query ...
9 votes
2 answers
4k views

Postgres with pgpool architecture

Below is an example pgpool architecture: This implies that you only need to have pgpool on a single server; is this true? When I look at the configuration I also see that you configure backends ...
0 votes
1 answer
770 views

how to find a connection string value for a session in sql server?

I know there was a similar question before at SO as shown here However, that answer really does not address my question. So here is my scenario, and I will demo it with PowerShell. The following code ...