cancel
Showing results for 
Search instead for 
Did you mean: 

load testing connection pooling

luisalves00
Champ in-the-making
Champ in-the-making
Hello,

My load test seem to fail because of some kind of connection starvation (still not sure).

O configure the engine programmaticaly:


org.apache.commons.dbcp.BasicDataSource bds = new org.apache.commons.dbcp.BasicDataSource();
            bds.setDefaultAutoCommit(false); //FIXME: make me configurable
            bds.setUsername(ApplicationConfig.getEncryptedConfigParamDecrypted("activiti.username"));
            bds.setPassword(ApplicationConfig.getEncryptedConfigParamDecrypted("activiti.password"));
            bds.setDriverClassName(ApplicationConfig.getConfigParam("activiti.driverClassName"));
            bds.setUrl(ApplicationConfig.getConfigParam("activiti.url"));



            ProcessEngine processEngine = ProcessEngineConfiguration
                    .createStandaloneProcessEngineConfiguration()
                    .setDataSource(bds)
                    .setJdbcMaxActiveConnections(100)            
                    .setJdbcMaxIdleConnections(25)
                    .setDatabaseType(ApplicationConfig.getConfigParam("activiti.databaseType"))
                    .setDatabaseSchemaUpdate(ApplicationConfig.getConfigParam("activiti.databaseSchemaUpdate"))
                    .setHistory(ApplicationConfig.getConfigParam("activiti.history"))
                    .setProcessEngineName(ACTIVITI_ENGINE_NAME)
                    .setJobExecutorActivate(false) //FIXME: make me configurable
                    .buildProcessEngine();

            ProcessEngines.registerProcessEngine(processEngine);

only see 8 connections to the db, with 15 parallel request.

any idea?
23 REPLIES 23

luisalves00
Champ in-the-making
Champ in-the-making
6 parallel requests…seem to work…

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Activity 0.9 is not supported anymore

luisalves00
Champ in-the-making
Champ in-the-making
ronald.van.kuijk,

I'm using activiti-5.6 what is Activity 0.9?

luisalves00
Champ in-the-making
Champ in-the-making
Updates…

using code like this:

           .setJdbcUrl("jdbc:mysql://localhost:3306/activiti?autoReconnect=true")
                    .setJdbcDriver("com.mysql.jdbc.Driver")
                    .setJdbcUsername("activiti")
                    .setJdbcPassword("activiti")
                    //.setDataSource(bds) <- NOT USING THIS

When using an external DS I need to add something like c3p0?

jbarrez
Star Contributor
Star Contributor
No, in this case Ibatis will be able to do the connection pooling. Check the userguide for the details on how you can configure these settings.
When you provide a datasource, you will need to do it yourself (eg with c3p0).

luisalves00
Champ in-the-making
Champ in-the-making
And how can I get ibatis to support autoCommit?

I'm getting org.apache.ibatis.transaction.TransactionException: Error configuring AutoCommit. Your driver may not support getAutoCommit() or setAutoCommit(). Requested setting: false.  Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

jbarrez
Star Contributor
Star Contributor
why do you need autocommit? I wouldn't use it .. ever.

luisalves00
Champ in-the-making
Champ in-the-making
I do not know if I need it…but I'm getting that exception…and I don't know why.

I'm using Activiti 5.6.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
look in jira for the dbid generator issue. That is probably where you run into.