load testing connection pooling
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2011 07:33 AM
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?
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2011 01:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2011 01:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2011 01:29 PM
I'm allways getting this exception:
29-09-2011 06:30:16 CommandContext [ERROR] Error while closing command context
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: The last packet successfully received from the server was 86.321.988 milliseconds ago. The last packet sent successfully to the server was 86.321.988 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.setDesiredAutoCommit(JdbcTransaction.java:47)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.<init>(JdbcTransaction.java:15)
at org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory.newTransaction(JdbcTransactionFactory.java:15)
at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:77)
at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:32)
at org.activiti.engine.impl.db.DbSqlSession.<init>(DbSqlSession.java:84)
at org.activiti.engine.impl.db.DbSqlSessionFactory.openSession(DbSqlSessionFactory.java:77)
at org.activiti.engine.impl.interceptor.CommandContext.getSession(CommandContext.java:177)
at org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext.getDbSqlSession(StandaloneMybatisTransactionContext.java:77)
at org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext.commit(StandaloneMybatisTransactionContext.java:58)
at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:112)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.IdentityServiceImpl.createUserQuery(IdentityServiceImpl.java:70)
Already got autoReconnect=true ….wait_timeout is set to mysql default (think its 8 hours)…

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2011 09:25 AM
In your activiti.cfg.xml
<bean id="processEngineConfiguration" … >
…
<property name="idGenerator">
<bean class="org.activiti.engine.impl.persistence.StrongUuidGenerator" />
</property>
</bean>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2011 03:41 AM
I'm configuring my processEngine on java code…not in the xml.
Questions:
1. how to set this on the code?
2. is valid for 5.6 or only 5.7?
best regards,
la00

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2011 04:40 AM
1. how to set this on the code?1. Use the setter
2. is valid for 5.6 or only 5.7?
setIdGenerator(IdGenerator idGenerator)
2. from 5.7 on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2011 11:01 AM
I've updated to 5.7 and can't find it…
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2011 04:48 AM
ProcessEngineConfigurationImpl pec = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration …..
pec.setIdGenerator(new org.activiti.engine.impl.persistence.StrongUuidGenerator());
ProcessEngine processEngine = (ProcessEngine) pec.buildProcessEngine();
(new org.activiti.engine.impl.persistence.StrongUuidGenerator()); this throws an exception…
I think I can't do 'new' because StrongUuidGenerator must depend on some dependency injection…
Do you know any factory method?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2011 05:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2011 05:55 AM
library java-uuid-generator-3.1.2.jar did the trick…
