[Datasource Configuration] - Database connection taking time in Jboss as 7.1.1
by mandarv99
mandarv99 [https://community.jboss.org/people/mandarv99] created the discussion
"Database connection taking time in Jboss as 7.1.1"
To view the discussion, visit: https://community.jboss.org/message/763131#763131
--------------------------------------------------------------
Hello everyone,
I am testing a servlet on Jboss AS 7.1.1.Final. In production environment it is expected to get around 10,000 requests in a minute. When I have simulated it without connecting to database it was taking requests close to 12,000 per minute. However, when I add database connection to it, it takes around 100 to 2000 requests per minute. When I start the server, till the time pool is filled it takes only around 50-100 request in a minute and after 3-4 minutes it takes 2000 requests.
I am using Oracle RAC 11g 11.2.0.3 and server is having 8GB RAM.
This is my datasource setting.
<datasources>
<datasource jta="true" jndi-name="java:jboss/datasources/OracleDS" pool-name="OracleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:oracle:oci:@ Connection - String</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<driver>ojdbc6.jar</driver>
<pool>
<min-pool-size>100</min-pool-size>
<max-pool-size>500</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>moviebeam_usr</user-name>
<password>m0viebe4m</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<timeout>
<blocking-timeout-millis>1000</blocking-timeout-millis>
<idle-timeout-minutes>5</idle-timeout-minutes>
</timeout>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
<drivers>
<driver name="ojdbc6.jar" module="com.oracle.ojdbc">
<xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
</driver>
</drivers>
</datasources>
Also i have added this setting for threads.
<bounded-queue-thread-pool name="http-executor">
<core-threads count="14500"/>
<queue-length count="30"/>
<max-threads count="15000"/>
<keepalive-time time="300" unit="seconds"/>
</bounded-queue-thread-pool>
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" max-post-size="2048" max-save-post-size="0" executor="http-executor" max-connections="12000"/>
This is datasource outcome in cli.
{
"outcome" => "success",
"result" => {
"ActiveCount" => "4",
"AvailableCount" => "496",
"AverageBlockingTime" => "0",
"AverageCreationTime" => "805",
"CreatedCount" => "4",
"DestroyedCount" => "0",
"MaxCreationTime" => "1102",
"MaxUsedCount" => "4",
"MaxWaitTime" => "0",
"TimedOut" => "0",
"TotalBlockingTime" => "0",
"TotalCreationTime" => "3223"
}
}
{
"outcome" => "success",
"result" => {
"ActiveCount" => "101",
"AvailableCount" => "400",
"AverageBlockingTime" => "0",
"AverageCreationTime" => "44052",
"CreatedCount" => "101",
"DestroyedCount" => "0",
"MaxCreationTime" => "71020",
"MaxUsedCount" => "100",
"MaxWaitTime" => "1",
"TimedOut" => "0",
"TotalBlockingTime" => "6",
"TotalCreationTime" => "4449312"
}
}
Am I missing anything or configuring it wrong.
Please suggest.
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/763131#763131]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 6 months
[jBPM] - Scope of the LocalTaskService
by wqe wqe
wqe wqe [https://community.jboss.org/people/drupalspring] created the discussion
"Scope of the LocalTaskService"
To view the discussion, visit: https://community.jboss.org/message/763152#763152
--------------------------------------------------------------
According to this https://community.jboss.org/thread/205868 thread ,since the session will keep the state likes facts or timer , I use "one process instance per session" +architecture+ in which each process instance is created and manutiplated by their own dedicate session.
For the human task , I use the LocalTaskService which is defined as singleton Spring bean. So , after creating the session from an application scoped Knowledge base , I registered the work item handler using the following code .
StatefulKnowledgeSession session = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);
TaskService localTaskService = (TaskService)springContext.getBean("localTaskService");
LocalHTWorkItemHandler humanTaskHandler = new LocalHTWorkItemHandler(localTaskService, session);
session.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler);
All the session use the same localTaskService instance to call the related API to do the human task operations . Is it okay or should I create the localTaskService for each session ? I ask because it seems that calling the method of localTaskService instance will somehow invoke the method on StatefulKnowledgeSession instance .
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/763152#763152]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 6 months
[jBPM] - Re: Tasks Assigned to Groups Not Found
by Marcio Dantas
Marcio Dantas [https://community.jboss.org/people/marcio.dantas] created the discussion
"Re: Tasks Assigned to Groups Not Found"
To view the discussion, visit: https://community.jboss.org/message/763074#763074
--------------------------------------------------------------
Guys,
in the "New' query above there's a cartesian product that brought me incorrect results.
Below, I change the query to use a left join.
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
owner,
creator,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime)
from
Task t
left join t.taskData.createdBy as creator
left join t.taskData.actualOwner as owner
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name
left join t.peopleAssignments.potentialOwners potentialOwners
where
( potentialOwners.id = :userId or potentialOwners.id in (:groupIds) ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
t.taskData.expirationTime is null
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/763074#763074]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 6 months