connection-pooling

Microservices - Connection Pooling when connecting to a single legacy database

半城伤御伤魂 提交于 2019-12-10 15:52:17
问题 I am working on developing micro services for a monolithic application using spring boot + spring cloud + spring JDBC. Currently, the application is connecting to a single database through tomcat JNDI connection pool. We have a bottleneck here, not to change the database architecture at this point of time because of various reasons like large number of db objects,tight dependencies with other systems,etc. So we have isolated the micro services based on application features. My concern is if

AWS Lambda RDS Connection Pooling

自古美人都是妖i 提交于 2019-12-10 15:16:02
问题 We are trying to add AWS X ray JDBC interceptor to our lambda functions and in order to add JDBC interceptor we have added Tomcat JDBC datasource with max active and max idle connection as 1. Connections are not getting reused and we are getting lot of "connection already closed error". Another pattern we observed is Lambda is taking almost 10 minutes to flush the connection from Aurora DB. Did any one successfully implemented connection pooling with Lambda.( Java 8) and RDS (Aurora). 回答1: I

Create a sqlalchemy engine using an existing psycopg2 connection pool

放肆的年华 提交于 2019-12-10 14:58:07
问题 I'm adding a new ORM class using sqlalchemy's declarative mapping system. My codebase has an existing psycopg2 connection pool, which I want to reuse - I don't want code using my orm classes to have its own pool. There's a lot of existing code which directly calls get_conn on the psycopg2 pool, so I don't want to just replace it either. I'm having a problem constructing the engine to connect with. pool_config = {...} POOL = psycopg2.pool.ThreadedConnectionPool(0, 32, **pool_config) [...]

IIS Connection Pool interrogation/leak tracking

倖福魔咒の 提交于 2019-12-10 10:18:09
问题 Per this helpful article I have confirmed I have a connection pool leak in some application on my IIS 6 server running W2k3. The tough part is that I'm serving 300 websites written by 700 developers from this server in 6 application pools, 50% of which are .NET 1.1 which doesn't even show connections in the CLR Data performance counter. I could watch connections grow on my end if everything were .NET 2.0+, but I'm even out of luck on that slim monitoring tool. My 300 websites connect to

Rails: Does every http request creates a new connection pool?

拈花ヽ惹草 提交于 2019-12-10 09:28:51
问题 i am reading this article https://polycrystal.org/posts/2012-05-25-active-record-connection-pool-fairness.html and it states that every http reuest create a new connection pool. is it true?? If it is true then what if a http request creates two threads that needs to access database then will that two threads create two separate connection pool agian or they will use the connection pool created by a http request. Thanks, 回答1: Not request, but every worker process. The whole concept of

Why would moving our .NET /SQL Server website to a new host cause connection pool size to be exceeded?

橙三吉。 提交于 2019-12-10 06:39:52
问题 We've recently moved our company website to a new host. It is an ASP.NET site with C# code behind, connecting to MS SQL server. Since moving the site to the new server, the site is exceeding the connection pool limit (which is not set explicitly, so I believe is at the default size of 100). Inspection of the open processes via SQL Server Management Studiorevealed that every database call appeared to be left open, and indeed, in the code I can find no explicitly closed connections at all. The

Java accessing ServletContext from within restlet Resource

人走茶凉 提交于 2019-12-10 06:39:49
问题 I am using Tomcat server in java and wanted to be able to access the ServletContext from the restlet Resource in order to access my cached DataSource object (to pool mysql connections). org.restlet.resource.Resource comes with a Context object but that is not in any way related to the ServletContext. So after some googling around, I found the following: final String contextKey = "org.restlet.ext.servlet.ServletContext"; final String poolKey = "MyCachedDBPool"; final Map<String, Object> attrs

SqlConnection vs Sql Session. Do their lifetimes coincide?

…衆ロ難τιáo~ 提交于 2019-12-10 02:11:53
问题 I want to apply some sql-session level settings for certain processes in my c# app. For instance, I want to set DEADLOCK_PRIORITY for some background processes to LOW . The questions are: If I open a new sql connection, does that start a new sql-session? Will the sql-session live until the connection is closed? If I apply my settings right after the SqlConnection is opened, will they be valid for all queries executed in context of that same SqlConnection ? What about connection pooling ? Is

How do I get connection pooling working on a PHP-CGI PDO iSeries Access UnixODBC Connection?

杀马特。学长 韩版系。学妹 提交于 2019-12-09 18:58:47
问题 I am trying to get connection pooling working using PHP/PDO with a UnixODBC driver called iSeries Access for Linux. I do not set the PDO::ATTR_PERSISTENT in my PDO constructor as I want to use pooling and not persistence (I am in a PHP-CGI environment). Using the "Connection Pooling" section of http://www.ibm.com/developerworks/systems/library/es-linux_bestpract.html I have placed Pooling = Yes in my odbc.ini and CPTimeout = 600 in my odbcinst.ini However, it seems that the ODBC driver is not

Meteor consuming huge number of Mongo connections

試著忘記壹切 提交于 2019-12-09 17:56:45
问题 We've been having this issue in prod for the past few weeks. Every few days, the number of connections to our compose.io Mongo db spikes to nearly 5000, which is the connection limit. There doesn't appear to be any specific trigger for this behavior. The logs look like this: 2018-08-14T00:02:32.000+00:00 aws-eu-west-1-portal.9.dblayer.com mongodb320: syslogd.25 | 212.233.54.22 65418 [13/Aug/2018:23:57:32.327] ft_mongodb/1: Timeout during SSL handshake 2018-08-14T00:02:32.000+00:00 aws-eu-west