Search Results

Search found 236 results on 10 pages for 'pooling'.

Page 1/10 | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • SQLite connection pooling with Fluent NHibernate

    - by Groo
    Is there a way to setup SQLite connection pooling using Fluent NHibernate configuration? E.g. equivalent of DataSource=:memory: would be: var sessionFactory = Fluently .Configure() .Database(SQLiteConfiguration.Standard.InMemory) (etc.) Is there something eqivalent to "Pooling=True;Max Pool Size=1;"?

    Read the article

  • Does connection pooling work fine to execute 60 DB queries to load a page?

    - by willem
    We use Linq2Sql in an ASP.NET application. Unfortunately the eager-loading in Linq2Sql isn't as powerful as in Entity Framework, so a lot of the data has to be lazy loaded as needed. Taking connection pooling into account, is it OK for a web page to execute 60 queries to load a page? Executing a single big query probably won't be much better, as those 60 queries will all those connection pooled connections and not open a new connection each time (which I realize is slow). Any thoughts?

    Read the article

  • Connection pooling options with JDBC: DBCP vs C3P0

    - by Dema
    What is the best connection pooling library available for Java/JDBC? I'm considering the 2 main candidates (free / open-source): Apache DBCB - http://commons.apache.org/dbcp/ C3P0 - http://sourceforge.net/projects/c3p0 I've read a lot about them in blogs and other forums but could not reach a decision. Is there any relevant alternatives to this two?

    Read the article

  • php connection pooling mysql

    - by coool
    Hi, I am planning to use MYSQL. Is there a connection pooling extension available. or what is the normal practice for connection. is this the one used in every where... mysqli_connect("localhost", "xxx", "xxx", "test"); Do people use just normal msql_connect or pconnect..? how better is pconnect and what setting should I do for PConnect.... THnks

    Read the article

  • What is best approach for connection pooling?

    - by Bhushan
    I am implementing connection pooling in project. Performance wise which is better approach to do it? Hibernate (using C3PO or DBCP) Configuring JDBC data-source in Application server. Application server Portability is not an important factor for me. Please suggest the approach.

    Read the article

  • COM+ Connection Pooling Doesn't Appear to be working on SQL Server 2005 Cluster

    - by kmacmahon
    We have a COM+ Data Layer that utilized Connection Pooling. Its deployed to 3 clusters, 2 SQL Server 2000 and 1 SQL Server 2005 environment. We noticed today that our monitoring software is reporting Thousands of Logins per minute on the SQL Server 2005 box. I did some tracing in both environments and profiler is reporting this for the 2000 boxes: sp_reset_connection SQL CALL sp_reset_connection SQL CALL sp_reset_connection SQL CALL and this for the 2005 box: Audit Logout sp_reset_connection Audit Login SQL CALL Audit Logout sp_reset_connection Audit Login SQL CALL Audit Logout sp_reset_connection Audit Login SQL CALL Is there some sort configuration for SQL Server 2005 different from SQL Server 2000 that we might be missing that would be creating this issue?

    Read the article

  • Scope of Connection Object for a Website using Connection Pooling (Local or Instance)

    - by Danny
    For a web application with connection polling enabled, is it better to work with a locally scoped connection object or instance scoped connection object. I know there is probably not a big performance improvement between the two (because of the pooling) but would you say that one follows a better pattern than the other. Thanks ;) public class MyServlet extends HttpServlet { DataSource ds; public void init() throws ServletException { ds = (DataSource) getServletContext().getAttribute("DBCPool"); } protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException { SomeWork("SELECT * FROM A"); SomeWork("SELECT * FROM B"); } void SomeWork(String sql) { Connection conn = null; try { conn = ds.getConnection(); // execute some sql ..... } finally { if(conn != null) { conn.close(); // return to pool } } } } Or public class MyServlet extends HttpServlet { DataSource ds; Connection conn;* public void init() throws ServletException { ds = (DataSource) getServletContext().getAttribute("DBCPool"); } protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException { try { conn = ds.getConnection(); SomeWork("SELECT * FROM A"); SomeWork("SELECT * FROM B"); } finally { if(conn != null) { conn.close(); // return to pool } } } void SomeWork(String sql) { // execute some sql ..... } }

    Read the article

  • pooling with Windsor

    - by AlonEl
    I've tried out the pooling lifestyle with Windsor. Lets say I want multiple CustomerTasks to work with a pool of ILogger's. when i try resolving more times than maxPoolSize, new loggers keeps getting created. what am i missing and what exactly is the meaning of min and max pool size? the xml configuration i use is (demo code): <component id="customertasks" type="WindsorTest.CustomerTasks, WindsorTestCheck" lifestyle="transient" /> <component id="logger.console" service="WindsorTest.ILogger, WindsorTestCheck" type="WindsorTest.ConsoleLogger, WindsorTestCheck" lifestyle="pooled" initialPoolSize="2" maxPoolSize="5" /> Code is: public interface ILogger { void Log(string message); } public class ConsoleLogger : ILogger { private static int count = 0; public ConsoleLogger() { Console.WriteLine("Hello from constructor number:" + count); count++; } public void Log(string message) { Console.WriteLine(message); } } public class CustomerTasks { private readonly ILogger logger; public CustomerTasks(ILogger logger) { this.logger = logger; } public void SaveCustomer() { logger.Log("Saved customer"); } }

    Read the article

  • jboss connection pooling

    - by Web
    I have a question related to Prepared Steatement pooling (across all connections). Here's the config file <datasources> <local-tx-datasource> <jndi-name>JNDI-NAME</jndi-name> <connection-url>jdbc:mysql://<server_name>/<database_name>?useServerPrepStmts=true</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <user-name>xxx</user-name> <password>xxxxx</password> <min-pool-size>10</min-pool-size> <max-pool-size>20</max-pool-size> <idle-timeout-minutes>20</idle-timeout-minutes> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name> <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name> <background-validation>true</background-validation> <background-validation-minutes>5</background-validation-minutes> <prepared-statement-cache-size>100</prepared-statement-cache-size> <share-prepared-statements>true</share-prepared-statements> <!-- sql to call when connection is created <new-connection-sql>some arbitrary sql</new-connection-sql> --> <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql> --> <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml --> <metadata> <type-mapping>mySQL</type-mapping> </metadata> </local-tx-datasource> </datasources> It seems that this line: <background-validation-minutes>5</background-validation-minutes> doesn't cause any problems with Prepared Statements, but: <idle-timeout-minutes>20</idle-timeout-minutes> causes that all connections are removed and re-created if there was no traffic for the last 20 minutes. Because of that existing Prepared Statements are removed from the pool of cached Prepared Statements. How to overcome this issue? I have to use idle-timeout-minutes because MySQL server closes the connection after 8h

    Read the article

  • Browsing Your ADF Application Module Pooling Params with WLST

    - by Duncan Mills
    In ADF 11g you can of course use Enterprise Manager (EM) to browse and configure the settings used by ADF Business Components  Application Modules, as shown here for one of my sample deployed applications. This screen you can access from the EM homepage by pulling down the Application Deployment menu, and then ADF > Configure ADF Business Components. Then select the profile that you are actually using (Hint: look in the DataBindings.cpx file to work this out - probably the "Local" version unless you've explicitly changed it. )So, from this screen you can change the pooling parameters and the world is good. But what if you don't have EM installed? In that case you can use the WebLogic scripting capabilities to view (and Update) the MBean Properties. Explanation The pooling parameters and many others are handled through Message Driven Beans that are created for the deployed application in the server. In the case of the ADF BC pooling parameters, this MBean will combine the configuration deployed as part of the application, along with any overrides defined as -D environement commands on the JVM startup for the application server instance. Using WLST to Browse the Bean ValuesFor our purposes here I'm doing this interactively, although you can also write a script or write Java to achieve the same thing.Step 0: Before You Start You will need the followingAccess to the console on the machine that is running the serverThe WebLogic Admin username and password (I'll use weblogic/password as my example here - yours will be different)The name of the deployed application (in this example FMWdh_application1)The package path to the bc4j.xcfg file (in this example oracle.demo.fmwdh.model.service.common.bc4j.xcfg) This is based on the default path for your model project so it shoudl be fairly easy to work out.The BC configuration your AM is actually running with (look in the DataBindings.cpx for that. In this example DealHelpServiceDeployed is the profile being used..)Step 1: Start the WLST consoleTo start at the beginning, you need to run the WLST command but that needs a little setup:Change to the wlserver_10.3/server/bin directory e.g. under your Fusion Middleware Home[oracle@mymachine] cd /home/oracle/FMW_R1/wlserver_10.3/server/binSet your environment using the setWLSEnv script. e.g. on Oracle Enterprise Linux:[oracle@mymachine bin] source setWLSEnv.shStart the WLST interactive console[oracle@mymachine bin] java weblogic.WLSTInitializing WebLogic Scripting Tool (WLST) ...Welcome to WebLogic Server Administration Scripting ShellType help() for help on available commandswls:/offline> Step 2:Enter the WLST commandsConnect to the server wls:> connect('weblogic','password')Change to the Custom root, this is where the AMPooling MBeans are registered wls:> custom()Change to the b4j MBean directorywls:> cd ('oracle.bc4j.mbean.config')Work out the correct directory for the AM configuration you need. This is the difficult bit, not because it's hard to do, but because the names are long. The structure here is such that every child MBean is displayed at the same level as the parent, so for each deployed application there will be many directories shown. In fact, do an ls() command here and you'll see what I mean. Each application will have one MBean for the app as a whole, and then for each deployed configuration in the .xcfg file you'll see: One for the config entry itself, and then one each for Security, DB Connection and AM Pooling. So if you deploy an app with just one configuration you'll see 5 directories, if it has two configurations in the .xcfg you'll see 9 and so on.The directory you are looking for will contain those bits of information you gathered in Step 0, specifically the Application Name, the configuration you are using and the xcfg name: First of all narrow your list to just those directories returned from the ls() command that begin oracle.bc4j.mbean.config:name=AMPool. These identify the AM pooling MBeans for all the deployed applications. Now look for the correct application name e.g. Application=FMWdh_application1The config setting in that sub-list should already be correct and match what you expect e.g. oracle.bc4j.mbean.config=oracle.demo.fmwdh.model.service.common.bc4j.xcfgFinally look for the correct value for the AppModuleConfigType e.g. oracle.bc4j.mbean.config.AppModuleConfigType=DealHelpServiceDeployedNow you have identified the correct directory name, change to that (keep the name on one line of course - I've had to split it across lines here for clarity:wls:> cd ('oracle.bc4j.mbean.config:name=AMPool,     type=oracle.bc4j.mbean.config.AppModuleConfigType.AMPoolType,    oracle.bc4j.mbean.config=oracle.demo.fmwdh.model.service.common.bc4j.xcfg,    Application=FMWdh_application1,    oracle.bc4j.mbean.config.AppModuleConfigType=DealHelpServiceDeployed') Now you can actually view the parameter values with a simple ls() commandwls:> ls()And here's the output in which you can view the realtime values of the various pool settings: -rw- AmpoolConnectionstrategyclass oracle.jbo.common.ampool.DefaultConnectionStrategy -rw- AmpoolDoampooling true -rw- AmpoolDynamicjdbccredentials false -rw- AmpoolInitpoolsize 2 -rw- AmpoolIsuseexclusive true -rw- AmpoolMaxavailablesize 40 -rw- AmpoolMaxinactiveage 600000 -rw- AmpoolMaxpoolsize 4096 -rw- AmpoolMinavailablesize 2 -rw- AmpoolMonitorsleepinterval 600000 -rw- AmpoolResetnontransactionalstate true -rw- AmpoolSessioncookiefactoryclass oracle.jbo.common.ampool.DefaultSessionCookieFactory -rw- AmpoolTimetolive 3600000 -rw- AmpoolWritecookietoclient false -r-- ConfigMBean true -rw- ConnectionPoolManager oracle.jbo.server.ConnectionPoolManagerImpl -rw- Doconnectionpooling false -rw- Dofailover false -rw- Initpoolsize 0 -rw- Maxpoolcookieage -1 -rw- Maxpoolsize 4096 -rw- Poolmaxavailablesize 25 -rw- Poolmaxinactiveage 600000 -rw- Poolminavailablesize 5 -rw- Poolmonitorsleepinterval 600000 -rw- Poolrequesttimeout 30000 -rw- Pooltimetolive -1 -r-- ReadOnly false -rw- Recyclethreshold 10 -r-- RestartNeeded false -r-- SystemMBean false -r-- eventProvider true -r-- eventTypes java.lang.String[jmx.attribute.change] -r-- objectName oracle.bc4j.mbean.config:name=AMPool,type=oracle.bc4j.mbean.config.AppModuleConfigType.AMPoolType,oracle.bc4j.mbean.config=oracle.demo.fmwdh.model.service.common.bc4j.xcfg,Application=FMWdh_application1,oracle.bc4j.mbean.config.AppModuleConfigType=DealHelpServiceDeployed -rw- poolClassName oracle.jbo.common.ampool.ApplicationPoolImpl Thanks to Brian Fry on the JDeveloper PM Team who did most of the work to put this sequence of steps together with me badgering him over his shoulder.

    Read the article

  • TransactionScope and Connection Pooling

    - by Graham
    Hi, I'm trying to get a handle on whether we have a problem in our application with database connections using incorrect IsolationLevels. Our application is a .Net 3.5 database app using SQL Server 2005. I've discovered that the IsolationLevel of connections are not reset when they are returned to the connection pool (see here) and was also really surprised to read in this blog post that each new TransactionScope created gets its own connection pool assigned to it. Our database updates (via our business objects) take place within a TransactionScope (a new one is created for each business object graph update). But our fetches do not use an explicit transaction. So what I'm wondering is could we ever get into the situation where our fetch operations (which should be using the default IsolationLevel - Read Committed) would reuse a connection from the pool which has been used for an update, and inherit the update IsolationLevel (RepeatableRead)? Or would our updates be guaranteed to use a different connection pool seeing as they are wrapped in a TransactionScope? Thanks in advance, Graham

    Read the article

  • Connection Pooling in J2SE?

    - by Zombies
    It is hard to find a resource on this without finding J2EE, but here is what I am looking for: All I have is a standard J2SE app, it makes a lot of DB connections. I simply need to make use of a connection pool. Any suggestions?

    Read the article

  • OpenJPA + Tomcat JDBC Connection Pooling = stale data

    - by Julie MacNaught
    I am using the Tomcat JDBC Connection Pool with OpenJPA in a web application. The application does not see updated data. Specifically, another java application adds or removes records from the database, but the web application never sees these updates. This is quite a serious issue. I must be missing something basic. If I remove the Connection Pool from the implementation, the web application sees the updates. It's as if the web application's commits are never called on the Connection. Version info: Tomcat JDBC Connection Pool: org.apache.tomcat tomcat-jdbc 7.0.21 OpenJPA: org.apache.openjpa openjpa 2.0.1 Here is the code fragment that creates the DataSource (DataSourceHelper.findOrCreateDataSource method): PoolConfiguration props = new PoolProperties(); props.setUrl(URL); props.setDefaultAutoCommit(false); props.setDriverClassName(dd.getClass().getName()); props.setUsername(username); props.setPassword(pw); props.setJdbcInterceptors("org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;"+ "org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer;"+ "org.apache.tomcat.jdbc.pool.interceptor.SlowQueryReportJmx;"+ "org.apache.tomcat.jdbc.pool.interceptor.ResetAbandonedTimer"); props.setLogAbandoned(true); props.setSuspectTimeout(120); props.setJmxEnabled(true); props.setInitialSize(2); props.setMaxActive(100); props.setTestOnBorrow(true); if (URL.toUpperCase().contains(DB2)) { props.setValidationQuery("VALUES (1)"); } else if (URL.toUpperCase().contains(MYSQL)) { props.setValidationQuery("SELECT 1"); props.setConnectionProperties("relaxAutoCommit=true"); } else if (URL.toUpperCase().contains(ORACLE)) { props.setValidationQuery("select 1 from dual"); } props.setValidationInterval(3000); dataSource = new DataSource(); dataSource.setPoolProperties(props); Here is the code that creates the EntityManagerFactory using the DataSource: //props contains the connection url, user name, and password DataSource dataSource = DataSourceHelper.findOrCreateDataSource("DATAMGT", URL, username, password); props.put("openjpa.ConnectionFactory", dataSource); emFactory = (OpenJPAEntityManagerFactory) Persistence.createEntityManagerFactory("DATAMGT", props); If I comment out the DataSource like so, then it works. Note that OpenJPA has enough information in the props to configure the connection without using the DataSource. //props contains the connection url, user name, and password //DataSource dataSource = DataSourceHelper.findOrCreateDataSource("DATAMGT", URL, username, password); //props.put("openjpa.ConnectionFactory", dataSource); emFactory = (OpenJPAEntityManagerFactory) Persistence.createEntityManagerFactory("DATAMGT", props); So somehow, the combination of OpenJPA and the Connection Pool is not working correctly.

    Read the article

  • jdbc connection pooling

    - by llm
    Can anybody provide examples or links on how to establish a JDBC connection pool? From searching google I see many different ways of doing this and it is rather confusing. Ultimately I need the code to return a java.sql.Connection object, but I am having trouble getting started..any suggestions welcome.

    Read the article

  • Connection Pooling in J2SE?

    - by Zombies
    It is hard to find a resource on this without finding J2EE, but here is what I am looking for: All I have is a standard J2SE app, it makes a lot of DB connections. I simply need to make use of a connection pool. Any suggestions?

    Read the article

  • PHP OCI8 and Oracle 11g DRCP Connection Pooling in Pictures

    - by christopher.jones
    Here is a screen shot from a PHP OCI8 connection pooling demo that I like to run. It graphically shows how little database host memory is needed when using DRCP connection pooling with Oracle Database 11g. Migrating to DRCP can be as simple as starting the pool and changing the connection string in your PHP application. The script that generated the data for this graph was a simple "Parts" query application being run under various simulated user loads. I was running the database on a small Oracle Linux server with just 2G of memory. I used PHP OCI8 1.4. Apache is in pre-fork mode, as needed for PHP. Each graph has time on the horizontal access in arbitrary 'tick' time units. Click the image to see it full sized. Pooled connections Beginning with the top left graph, At tick time 65 I used Apache's 'ab' tool to start 100 concurrent 'users' running the application. These users connected to the database using DRCP: $c = oci_pconnect('phpdemo', 'welcome', 'myhost/orcl:pooled'); A second hundred DRCP users were added to the system at tick 80 and a final hundred users added at tick 100. At about tick 110 I stopped the test and restarted Apache. This closed all the connections. The bottom left graph shows the number of statements being executed by the database per second, with some spikes for background database activity and some variability for this small test. Each extra batch of users adds another 'step' of load to the system. Looking at the top right Server Process graph shows the database server processes doing the query work for each web user. As user load is added, the DRCP server pool increases (in green). The pool is initially at its default size 4 and quickly ramps up to about (I'm guessing) 35. At tick time 100 the pool increases to my configured maximum of 40 processes. Those 40 processes are doing the query work for all 300 web users. When I stopped the test at tick 110, the pooled processes remained open waiting for more users to connect. If I had left the test quiet for the DRCP 'inactivity_timeout' period (300 seconds by default), the pool would have shrunk back to 4 processes. Looking at the bottom right, you can see the amount of memory being consumed by the database. During the initial quiet period about 500M of memory was in use. The absolute number is just an indication of my particular DB configuration. As the number of pooled processes increases, each process needs more memory. You can see the shape of the memory graph echoes the Server Process graph above it. Each of the 300 web users will also need a few kilobytes but this is almost too small to see on the graph. Non-pooled connections Compare the DRCP case with using 'dedicated server' processes. At tick 140 I started 100 web users who did not use pooled connections: $c = oci_pconnect('phpdemo', 'welcome', 'myhost/orcl'); This connection string change is the only difference between the two tests. At ticks 155 and 165 I started two more batches of 100 simulated users each. At about tick 195 I stopped the user load but left Apache running. Apache then gradually returned to its quiescent state, killing idle httpd processes and producing the downward slope at the right of the graphs as the persistent database connection in each Apache process was closed. The Executions per Second graph on the bottom left shows the same step increases as for the earlier DRCP case. The database is handling this load. But look at the number of Server processes on the top right graph. There is now a one-to-one correspondence between Apache/PHP processes and DB server processes. Each PHP processes has one DB server processes dedicated to it. Hence the term 'dedicated server'. The memory required on the database is proportional to all those database server processes started. Almost all my system's memory was consumed. I doubt it would have coped with any more user load. Summary Oracle Database 11g DRCP connection pooling significantly reduces database host memory requirements allow more system memory to be allocated for the SGA and allowing the system to scale to handled thousands of concurrent PHP users. Even for small systems, using DRCP allows more web users to be active. More information about PHP and DRCP can be found in the PHP Scalability and High Availability chapter of The Underground PHP and Oracle Manual.

    Read the article

  • Connection Pooling is Busted

    - by MightyZot
    A few weeks ago we started getting complaints about performance in an application that has performed very well for many years.  The application is a n-tier application that uses ADODB with the SQLOLEDB provider to talk to a SQL Server database.  Our object model is written in such a way that each public method validates security before performing requested actions, so there is a significant number of queries executed to get information about file cabinets, retrieve images, create workflows, etc.  (PaperWise is a document management and workflow system.)  A common factor for these customers is that they have remote offices connected via MPLS networks. Naturally, the first thing we looked at was the query performance in SQL Profiler.  All of the queries were executing within expected timeframes, most of them were so fast that the duration in SQL Profiler was zero.  After getting nowhere with SQL Profiler, the situation was escalated to me.  I decided to take a peek with Process Monitor.  Procmon revealed some “gaps” in the TCP/IP traffic.  There were notable delays between send and receive pairs.  The send and receive pairs themselves were quite snappy, but quite often there was a notable delay between a receive and the next send.  You might expect some delay because, presumably, the application is doing some thinking in-between the pairs.  But, comparing the procmon data at the remote locations with the procmon data for workstations on the local network showed that the remote workstations were significantly delayed.  Procmon also showed a high number of disconnects. Wireshark traces showed that connections to the database were taking between 75ms and 150ms.  Not only that, but connections to a file share containing images were taking 2 seconds!  So, I asked about a trust.  Sure enough there was a trust between two domains and the file share was on the second domain.  Joining a remote workstation to the domain hosting the share containing images alleviated the time delay in accessing the file share.  Removing the trust had no affect on the connections to the database. Microsoft Network Monitor includes filters that parse TDS packets.  TDS is the protocol that SQL Server uses to communicate.  There is a certificate exchange and some SSL that occurs during authentication.  All of this was evident in the network traffic.  After staring at the network traffic for a while, and examining packets, I decided to call it a night.  On the way home that night, something about the traffic kept nagging at me.  Then it dawned on me…at the beginning of the dance of packets between the client and the server all was well.  Connection pooling was working and I could see multiple queries getting executed on the same connection and ethereal port.  After a particular query, connecting to two different servers, I noticed that ADODB and SQLOLEDB started making repeated connections to the database on different ethereal ports.  SQL Server would execute a single query and respond on a port, then open a new port and execute the next query.  Connection pooling appeared to be broken. The next morning I wrote a test to confirm my hypothesis.  Turns out that the sequence causing the connection nastiness goes something like this: Make a connection to the database. Open a result set that returns enough records to require multiple roundtrips to the server. For each result, query for some other data in the database (this will open a new implicit connection.) Close the inner result set and repeat for every item in the original result set. Close the original connection. Provided that the first result set returns enough data to require multiple roundtrips to the server, ADODB and SQLOLEDB will start making new connections to the database for each query executed in the loop.  Originally, I thought this might be due to Microsoft’s denial of service (ddos) attack protection.  After turning those features off to no avail, I eventually thought to switch my queries to client-side cursors instead of server-side cursors.  Server-side cursors are the default, by the way.  Voila!  After switching to client-side cursors, the disconnects were gone and the above sequence yielded two connections as expected. While the real problem is the amount of time it takes to make connections over these MPLS networks (100ms on average), switching to client-side cursors made the problem go away.  Believe it or not, this is actually documented by Microsoft, and rather difficult to find.  (At least it was while we were trying to troubleshoot the problem!)  So, if you’re noticing performance issues on slower networks, or networks with slower switching, take a look at the traffic in a tool like Microsoft Network Monitor.  If you notice a high number of disconnects, and you’re using fire-hose or server-side cursors, then try switching to client-side cursors and you may see the problem go away. Most likely, Microsoft believes this to be appropriate behavior, because ADODB can’t guarantee that all of the data has been retrieved when you execute the inner queries.  I’m not convinced, though, because the problem remains even after replacing all of the implicit connections with explicit connections and closing those connections in-between each of the inner queries.  In that case, there doesn’t seem to be a reason why ADODB can’t use a single connection from the connection pool to make the additional queries, bringing the total number of connections to two.  Instead ADO appears to make an assumption about the state of the connection. I’ve reported the behavior to Microsoft and am awaiting to hear from the appropriate team, so that I can demonstrate the problem.  Maybe they can explain to us why this is appropriate behavior.  :)

    Read the article

  • Do I need to use C3P0 pooling library in my (grails) web application?

    - by fabien7474
    Hi, I am not familiar at all with connection pooling library. I've just discovered it through this blog article) and I am not sure that I should use one in my web application based on grails/hibernate/mysql. So my question is simple : in which situations would you suggest to integrate a connection pooling library into a grails application? Always, Never or only over some connections threshold? P.S. : If you have ever used successfully C3P0 in your web application, I will greatly appreciate to hear your feedback (in terms of visible positive effects).

    Read the article

  • Pooling (Singleton) Objects Against Connection Pools

    - by kolossus
    Given the following scenario A canned enterprise application that maintains its own connection pool A homegrown client application to the enterprise app. This app is built using Spring framework, with the DAO pattern While I may have a simplistic view of this, I think the following line of thinking is sound: Having a fixed pool of DAO objects, holding on to connection objects from the pool. Clearly, the pool should be capable of scaling up (or down depending on need) and the connection objects must outnumber the DAOs by a healthy margin. Good Instantiating brand new DAOs for every request to access the enterprise app; each DAO will attempt to grab a connection from the pool and release it when it's done. Bad Since these are service objects, there will be no (mutable) state held by the objects (reduced risk of concurrency issues) I also think that with #1, there should be little to no resource contention, while in #2, there'll almost always be a DAO waiting to be serviced. Is my thinking correct and what could go wrong?

    Read the article

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

    - by vladimir
    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, closes the connection and returns the result. Then it gets torn down by the WCF, and the next incoming call creates a new instance of the service. In other words, my service gets instantiated per client call, as in [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]. The service accesses an SQL Server 2008 database. I'm using .NET framework 3.5 SP1. Does the connection pooling still work in this scenario, or I need to roll my own connection pool in form of a singleton or by some other means (IInstanceContextProvider?). I would rather avoid reinventing the wheel, if possible.

    Read the article

  • ODBC Connection Pooling

    - by beansy
    I have inherited a suite of .Net c# applications from a developer which talk to an Informix database on a unix server. Instead of using the usual practices for managing the database connections (disposable pattern / "open late / close early"), the code seems to open one ODBC connection when each app loads and doesn't close it. Connection pooling is turned via the ODBC administrator. Is there any way of seeing how many ODBC connections are open? What is the effect of turning off connection pooling? Am I right in thinking the .NET framework will use connection pooling anyway?

    Read the article

1 2 3 4 5 6 7 8 9 10  | Next Page >