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
2 answers
31 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 ...
Basil Titus's user avatar
0 votes
1 answer
53 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
49 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
112 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
86 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
0 votes
0 answers
46 views

Postgres DB slowness issue and idle sessions higher than active sessions

Facing postgres db slowness issue setted max db connection limit 400 but connection not exceeding more than 230 also could see idle sessions higher than active sessions.Any suggestions for tuning db ...
Gopi's user avatar
  • 1
2 votes
1 answer
939 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
1k 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
71 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,049
0 votes
1 answer
84 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
916 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
53 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
4 votes
2 answers
10k 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
  • 43
1 vote
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
168 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
860 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
402 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
322 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
1k 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
1 vote
2 answers
2k 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
4k 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
595 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
465 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
24k 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
473 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
1k 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,295
1 vote
1 answer
1k 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
692 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,013
2 votes
1 answer
3k 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,295
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
391 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
209 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,448
1 vote
0 answers
124 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
648 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
2k 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
20k 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
643 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
623 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
10 votes
1 answer
13k 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 ...
matt's user avatar
  • 287
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
3 votes
1 answer
534 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
6 votes
3 answers
10k views

How to handle MySQL database connections/pooling from Lambda -> RDS with Node

I'm running into some problems while testing my Lambda function. I my test, I execute in parallel N executions of my Lambda function. In my lambda function, I retrieve a database connection through ...
Austin Gayler's user avatar
1 vote
2 answers
464 views

How to Deal with Performace counters

Recently we got this alert from monitoring team. SQLServer:General Statistics Logins/sec has exceeded the threshold of 2 I tried to know a bit about it and if the value is less than 2 per ...
Learning_Learning's user avatar
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 ...
Sylvain's user avatar
  • 189