Skip to main content

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
22 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 ...
mediocre's user avatar
  • 129
0 votes
0 answers
19 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 ...
PajLe's user avatar
  • 133
0 votes
1 answer
24 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 ...
mediocre's user avatar
  • 129
0 votes
1 answer
67 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 ...
Arnfred's user avatar
  • 101
0 votes
1 answer
202 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 ...
kumar ashish's user avatar
0 votes
2 answers
716 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 ...
mediocre's user avatar
  • 129
0 votes
1 answer
187 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 ...
Justin Lowen's user avatar
2 votes
1 answer
61 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: ...
Corie LeClair's user avatar
0 votes
2 answers
598 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 ...
Corie LeClair's user avatar
0 votes
1 answer
153 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, ...
troubleddev's user avatar
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 ...
Tần Quảng's user avatar
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, ...
Jake McGraw's user avatar
1 vote
2 answers
83 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 ...
Ronaldo's user avatar
  • 5,091
0 votes
1 answer
91 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 ...
Tuntable's user avatar
  • 143
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 ...
NewUser546's user avatar
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, ...
mcv110's user avatar
  • 75
5 votes
2 answers
14k 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 ...
El MoZo's user avatar
  • 53
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 ...
Constantin's user avatar
0 votes
2 answers
177 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 ...
DBA_Kyle's user avatar
0 votes
1 answer
1k 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 ...
Selim Alawwa's user avatar
1 vote
0 answers
466 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 ...
pyramation's user avatar
0 votes
1 answer
428 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 ...
Frank Martin'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
  • 309
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 ...
Code Novice's user avatar
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 ...
Doctor Coder's user avatar
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 ...
Vikas's user avatar
  • 133
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 ...
cogitoergosum's user avatar
-1 votes
2 answers
522 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
Accelerator's user avatar
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 ...
CathalMF's user avatar
  • 111
0 votes
0 answers
546 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 ...
MartinJJ's user avatar
  • 101
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
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 ...
user9516827's user avatar
  • 1,315
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 ...
jonggu's user avatar
  • 144
0 votes
1 answer
791 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 ...
jyao's user avatar
  • 3,063
2 votes
1 answer
4k views

Connection pool Error

I am getting the below error from my .net application. Source: xxx.Services.xxx.xxx.xxxx.xxxx.xxxxRequest --- System.Data.Entity.Core.EntityException: The underlying provider failed on Open. -...
user9516827's user avatar
  • 1,315
0 votes
1 answer
2k views

How does Pymongo connection work?

I created a small speed test from misc.Database import Database import time db = Database.getDb() def main(): test_db = db.test_db.find({}) return "done" if __name__ == '__main__': ...
Lumo Woong's user avatar
3 votes
1 answer
409 views

Does missing logout event in SQL Server trace mean connection leak?

(originally asked this question on StackOverflow was told that this community is a right one). I am investigating possibility of unreleased SQL Server database connections. I ran SQL Server Profiler ...
Vagif Abilov's user avatar
0 votes
2 answers
221 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,518
1 vote
0 answers
142 views

concurrent configuration PostgreSQL and tomcat

Postgresql has a default of 100 regarding max_connections. Tomcat pooling has a default of 100 regarding maxActive and maxIdle. How about configuring data sources in context.xml for Apps in Tomcat? ...
Gunnar's user avatar
  • 121
1 vote
0 answers
10k views

org.postgresql.util.PSQLException: This connection has been closed. error for long running transactions

We are getting "org.postgresql.util.PSQLException: This connection has been closed." on one of our deployments for only long running transactions (more than a few minutes): Caused by: org.hibernate....
nilgun's user avatar
  • 111
3 votes
1 answer
677 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 ...
Bruce Riddle's user avatar
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 ...
user3768495's user avatar
2 votes
0 answers
1k views

Keeping MySql connections alive

I'm running a Windows service, which connects to a MySql database via Entity Framework. Every 10 seconds it issues a query to the database to see if any new records have been added. If it finds any, ...
Bob Tway's user avatar
  • 243
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 ...
user3443757's user avatar
8 votes
3 answers
22k views

Downside of large "max connections" in a connection pool from a web app [closed]

I understand that if you don't pool database connections at all, then you bear the overhead of establishing a new database connection every time you need to query the database, which will make your ...
joshua.paling's user avatar
1 vote
1 answer
669 views

Periodic connection failure on SQL Server 2012 AlwaysOn cluster

Since last wednesday (so a we're dealing with this for a week now) we're getting periodic connection problems on our production database cluster. (An alwayson cluster running on windows 2012, three ...
F.B. ten Kate's user avatar
1 vote
1 answer
679 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 ...
zulumojo's user avatar
3 votes
1 answer
3k views

What is the sense to use server_lifetime with PgBouncer?

I've found server_lifetime option in PgBouncer config, and I'm trying to undestand if it is really needed in our case. https://pgbouncer.github.io/config.html The pooler will try to close server ...
raacer's user avatar
  • 213
11 votes
1 answer
14k views

Choice of connection pooling library for VM deploys

HickariCP docs say: HikariCP relies heavily on accurate high-resolution timers for both performance and reliability. It is imperative that your server is synchronized with a time-source such as ...
matanox's user avatar
  • 297
4 votes
1 answer
4k views

Connection Timeouts and Failed Database Connections on AWS RDS

Environment details - Amazon RDS running PostgreSQL 9.3.14, db.r3.xlarge, IOPS 2000, 500 GB Issue - Numerous java.sql.SQLTimeoutException: Timeout after 30000ms of waiting for a connection and java....
gvatreya's user avatar
  • 203