Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [connection-pooling]

The tag has no usage guidance.

1
vote
1answer
50 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 ...
0
votes
1answer
23 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 ...
-1
votes
0answers
7 views

Asp.Net Application crashes find 0 rows get from database

My asp.net application crashes sometimes in live server while we are using it. All users are facing [Exceptions]yellow error screen.And Throws dozens of exception in exception log. On Tracing ...
2
votes
1answer
232 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. -...
0
votes
0answers
200 views

Idle (not idle in transaction) connections are not released/closed in PostgreSQL AWS RDS after load test

I'm using C3P0 connection pool and PostgreSQL(10.3) in AWS RDS. I did a load test at low TPS (1 TPS) for 2 minutes, after load test finished, the number of connections were not dropped according to ...
0
votes
1answer
188 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__': ...
3
votes
1answer
190 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 ...
0
votes
2answers
36 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 ...
1
vote
0answers
44 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? ...
0
votes
0answers
1k 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....
3
votes
0answers
47 views

How to handle too much load on MYSQL Innodb [closed]

I am handling a very heavy load on MYSQL as night jobs are running and doing operations and application is also running on the DB. Most common errors coming are "Too many connections" "small queries ...
3
votes
1answer
76 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
1answer
1k 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 ...
1
vote
0answers
213 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, ...
0
votes
1answer
414 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 ...
2
votes
3answers
2k 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 ...
1
vote
1answer
290 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 ...
2
votes
1answer
435 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 ...
4
votes
1answer
3k 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 ...
4
votes
1answer
994 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....
4
votes
1answer
131 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
3answers
5k 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 ...
0
votes
1answer
219 views

Too many events while auditing SQL Server

I need to activate an audit. I need to audit login, logut and failed login. So I created an audit: CREATE SERVER AUDIT [AuditLogin] TO FILE ( FILEPATH = N'D:\audit' ,MAXSIZE = 5 GB ,...
1
vote
2answers
145 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 ...
0
votes
1answer
100 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 ...
1
vote
0answers
745 views

Check Postgres Listener is up/down?

I am using PostgreSQL LISTEN/NOTIFY functionality in Java. So I have made a ListenerBean which is run at Application startup. LISTENER class in java: @Singleton @Startup ...
0
votes
2answers
206 views

pgbouncer on separate server than postgresql

Right now I am hosting postgresql and 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 ...
0
votes
1answer
400 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 ...
1
vote
1answer
487 views

MongoDB Connection Issues

We have a MEAN application with a 3-member MongoDB replica set. Somehow the total connection count keeps increasing until the primary is not able to take any new connections and goes down, making the ...
2
votes
1answer
508 views

Hundreds of TCP connections opened by sqlservr.exe

We have Tomcat on one machine and SQL Server on another. Our SQL Server machine is Windows 2008 R2 64bit machine with 32GB usable RAM 4 processors, 16 cpus. We use database pooling to keep db ...
5
votes
1answer
824 views

SQL Connection Pooling

I have a .net website connecting to SQL. Just wondering if connection pooling is enabled by default or is it something I have to activate myself?
3
votes
2answers
106 views

Edit Application Name to Log Connection once for Logons on Pooled Connections

I am wondering if I can change the application name of a connection in SQL Server itself, e.g. in the logon trigger? Is that possible or is the application name "read only"? Edit to explain the ...
8
votes
2answers
1k 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 ...
2
votes
0answers
39 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 ...
3
votes
1answer
329 views

Are database connections from an application expensive from a performance point of view?

A colleague tells me that connections to a database are expensive and could harm performance of the application. They ask me to create a procedure that calls say another 8 procedures, that way they ...
1
vote
1answer
6k views

Tomcat7 JDBC connection pool -> Connection has been abandoned

I have the following configuration for the JDBC connection pool initialSize="2" minIdle="10" maxIdle="50" maxActive="100" maxWait="15000" jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor....
2
votes
0answers
168 views

Connection Pools and TempDB Internal Objects

I am thinking I know the basics of the problem here, but I want to make sure I know the details before trying to explain it to others. We recently upgraded our third party application software to a ...
4
votes
2answers
2k 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: https://...
7
votes
2answers
1k 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 ...
1
vote
2answers
9k 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
0answers
29 views

Prevent Reconnections During Application Cluster Restart

I have a large cluster of application processes (>5000) spread out over multiple EC2 servers. When I attempt to restart them or deploy new code (with a restart), they all attempt to reconnect to the ...
9
votes
2answers
2k 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 ...
3
votes
1answer
24k views

JDBC pooling Oracle driver Socket read timed out [duplicate]

I run Java EE application on Glassfish server v3 together with Oracle 12 DB on the same machine under Windows Server 2012 64bit. I use latest ojdbc7 driver. Connection pool config: <jdbc-...
7
votes
3answers
2k 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 ((...
0
votes
1answer
452 views

Does “Connect” statement for every query indicate broken connection pooling?

there's only one client application running queries against a MySQL instance. After enabling MySQL's general query log (configured to log every query) I noticed that every query starts with a "...
2
votes
1answer
3k 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 ...
1
vote
1answer
2k views

ORA-12516 but max_utilization not reaching limit

Our app began to raise ORA-12516, TNS:listener could not find available handler with matching protocol stack errors, and I'm trying to diagnose why. The workload has not changed, so I think we might ...
8
votes
3answers
2k views

“When a connection is closed and returned to the pool, the isolation level from the last SET TRANSACTION ISOLATION LEVEL statement is retained”?

The MSDN online article "Snapshot Isolation in SQL Server" states: "An isolation level has connection-wide scope, and once set for a connection with the SET TRANSACTION ISOLATION LEVEL statement, it ...
2
votes
1answer
147 views

When should I start using connection pooling?

I have a MySQL database that peaks at about 300 connections/sec. What is the recommended connections per server and at what point should I start using connection pooling?
5
votes
2answers
2k 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 ...