connection-pooling

Operations timeout in Hibernate [closed]

梦想与她 提交于 2020-01-06 03:06:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Learning hibernate..please go easy :) This is my main class i am using to perform operations depending on users choice : package hibernate_tut_emp; import java.util.Iterator; import java.util.List; import java.util.Scanner; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate

.NET SQL Server connection issue - Maybe connection pool related

落爺英雄遲暮 提交于 2020-01-06 03:01:24
问题 I am having a very strange problem and am hoping someone out there has had a similar experience. My companies application for one client is getting "banned" from the SQL Server at the beginning of our application. The behavior is strange. I'll write it out in point form. SQL Connections are created, data is retrieved, the connections are closed, talk to another datasource and then denied access to SQL Server. Here's the long winded version: .NET application connects to database multiple times

Can a stateless WCF service benefit from built-in database connection pooling?

岁酱吖の 提交于 2020-01-05 17:04:13
问题 I understand that a typical .NET application that accesses a(n SQL Server) database doesn't have to do anything in particular in order to benefit from the connection pooling. Even if an application repeatedly opens and closes database connections, they do get pooled by the framework (assuming that things such as credentials do not change from call to call). My usage scenario seems to be a bit different. When my service gets instantiated, it opens a database connection once, does some work,

Can a stateless WCF service benefit from built-in database connection pooling?

喜欢而已 提交于 2020-01-05 17:01:53
问题 I understand that a typical .NET application that accesses a(n SQL Server) database doesn't have to do anything in particular in order to benefit from the connection pooling. Even if an application repeatedly opens and closes database connections, they do get pooled by the framework (assuming that things such as credentials do not change from call to call). My usage scenario seems to be a bit different. When my service gets instantiated, it opens a database connection once, does some work,

ServiceStack.Redis: Unable to Connect: sPort:

久未见 提交于 2020-01-04 04:29:06
问题 I regularly get ServiceStack.Redis: Unable to Connect: sPort: 0 or ServiceStack.Redis: Unable to Connect: sPort: 50071 (or another port number). This appears to happen when our site is busier. Redis itself appears fine, no real increase in CPU or memory usage. I'm using connection pooling and have tried changing the timeout values without success. public sealed class RedisConnection { // parameter values are: // Config.Settings.RedisPoolSize = 10000 // Config.Settings.RedisPoolTimeoutSeconds

Ado.Net - How to use connection pooling?

左心房为你撑大大i 提交于 2020-01-03 18:25:22
问题 .Net allows connection pooling which based on what I've read is simply by adding parameters to App.config The question is, am I suppose to do anything in my code to use the connection pool? In my code I open a connection every time data is needed and I close it as soon as I'm done. Am i suppose to do anything special to reuse connections? 回答1: You don't need to do anything special as long as your connections use the same connection string. Use the connection, close it and will automatically

What is the good design pattern for connection pooling?

时光总嘲笑我的痴心妄想 提交于 2020-01-03 17:23:31
问题 What is the good design pattern for implementing one connection (or generally resource) pool? For example, one tomcat server connects to one mysql server, and all the requests share a mysql connection pool on tomcat server. I have search for some time, some people proposed to use Singleton or put the initialization code inside some static block. But others said singleton is bad. So, what should be a right design pattern to use for connection pooling? Thanks. 回答1: Object (Resource) Pool is a

Reusing connections in Django with Python Requests

纵然是瞬间 提交于 2020-01-03 17:08:04
问题 What's the correct way of reusing Python Requests connections in Django across multiple HTTP requests. That's what I'm doing currently: import requests def do_request(data): return requests.get('http://foo.bar/', data=data, timeout=4) def my_view1(request) req = do_request({x: 1}) ... def my_view2(request) req = do_request({y: 2}) ... So, I have one function that makes the request. This function is called in various Django views. The views get called in separate HTTP requests by users. My

c3p0 Connection Checkin

筅森魡賤 提交于 2020-01-03 13:10:04
问题 I'm trying to implement a solution with c3p0 for the first time. I understand how to initialize the connection pool and "checkout" a Connection from the pool as follows: ComboPooledDataSource cpds = new ComboPooledDataSource(); cpds.setDriverClass(driverClass); cpds.setJdbcUrl(url); cpds.setUser(username); cpds.setPassword(password); Connection conn = cpds.getConnection(username, password); But I am having trouble finding out how to "checkin" an already used Connection to go back into the

c3p0 Connection Checkin

╄→гoц情女王★ 提交于 2020-01-03 13:09:34
问题 I'm trying to implement a solution with c3p0 for the first time. I understand how to initialize the connection pool and "checkout" a Connection from the pool as follows: ComboPooledDataSource cpds = new ComboPooledDataSource(); cpds.setDriverClass(driverClass); cpds.setJdbcUrl(url); cpds.setUser(username); cpds.setPassword(password); Connection conn = cpds.getConnection(username, password); But I am having trouble finding out how to "checkin" an already used Connection to go back into the