Java Webserver - Tomcat / Axis2 - Response time very slow!!
Hi all,
I'm developing a Java Web Server using Axis2 inside Tomcat 7, but i'm having a big problem with the response time for each request made.
The purpose of this application is to fetch data from a database and return it to a client (also developed in Java)
For example: If i make a request from the database for 4000 objects, the database returns the data rather quickly (about 100ms), but then it takes about 30 seconds to generate the soap response, the xml containing the response has about 3mb size. The class in the webservice that represents the information from the database is quite simple, it has a string array, and about 3 Integers and 2 Strings..
Is this normal for the response time? Is there any way to optimize (Tomcat definition, etc)?
Thanks in advance :)
Here's a method from the webserver that returns the information from the database:
* The method receives a SQL Query to execute, and return a list with all the objects from the database
public MyObject[] getMyObject(String querySQL) throws SQLException, ConfigurationException, AxisFault {
try {
ArrayList<MyObject> myObjectList = new ArrayList<MyObject>();
//Executes the query on the database
Statement stmt = RdbmsDAOFactory.connection.createStatement();
ResultSet rs = stmt.executeQuery(querySQL.toString());
//Fetching the results
while (rs.next()) {
List<AttributesFromMyObject> attributeList = new ArrayList<AttributesFromMyObject>();
int columnCount = rs.getMetaData().getColumnCount();
for(int i = 1; i <= columnCount; i++){
//This class saves the column name/value for each object from the database
AttributesFromMyObject attribute = new AttributesFromMyObject();
attribute.setName(rs.getMetaData().getColumnName(i));
attribute.setValue(rs.getString(i));
attributeList.add(attribute);
//Creates the object and saves the corresponding attributes list
MyObject r = new MyObject();
r.setAttributeValues((AttributeValue[])attributeList.toArray(new AttributeValue[0]));
//Add each object to the arraylist that will be returned at the end
myObjectList.add(r);
//UNTILL HERE IT TAKES ABOUT 125 ms
return (MyObject[])myObjectList.toArray(new MyObject[0]);
} catch (Exception e) {
throw new AxisFault ("Unknown error: " + e.getMessage() + " - " + e.getStackTrace());
}And here's a method from the client that saves the resuts from the Web Server
* The method sends a query sql to the Web Server and save the results
public void getMyObject(){
//This is from a library that i'm using to generate SQL
Table dbTable = new Table(tableName);
select = new SelectQuery(dbTable);
select.addColumn(dbTable, "*");
select.addCriteria(new InCriteria(new Column(dbTable, "[idObject]"), ids));
//Create request object to the Web Server
GetMyObject getMyObject = new GetMyObject();
getMyObject.setQuerySQL(select.toString());
//FROM HERE
MyObject[] rList = this.webService.getMyObject(getMyObject).get_return(); //Response from the Web Server
//TO HERE -> IT TAKES ABOUT 36 seconds IF I'M GETTING THE 4000 OBJECTS
}And here's a bit of the soap response that i'm getting (from a total of 82600 lines generated):
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:getMyObjectResponse xmlns:ns="http://xx.xxx.xxx.com" xmlns:ax21="http://xx.xxx.xxx.com/xsd"
xmlns:ax27="http://exception.lang.commons.apache.org/xsd" xmlns:ax26="http://configuration.commons.apache.org/xsd" xmlns:ax23="http://sql.java/xsd">
<ns:return xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:MyObject">
<ax21:attributeValues xsi:type="ax21:AttributeValue">
<ax21:name>idMyObject</ax21:name>
<ax21:value>2290</ax21:value>
</ax21:attributeValues>
<ax21:attributeValues xsi:type="ax21:AttributeValue">
<ax21:name>Calldate</ax21:name>
<ax21:value>2003-12-22 00:00:00.000</ax21:value>
</ax21:attributeValues>
<ax21:attributeValues xsi:type="ax21:AttributeValue">
<ax21:name>Call_duration</ax21:name>
<ax21:value>10</ax21:value>
</ax21:attributeValues>
<ax21:attributeValues xsi:type="ax21:AttributeValue">
<ax21:name>Gross_amnt</ax21:name>
<ax21:value>2.1000000000000001</ax21:value>
</ax21:attributeValues>
<ax21:id>0</ax21:id>
<ax21:idSourceEntity>0</ax21:idSourceEntity>
<ax21:idTargetEntity>0</ax21:idTargetEntity>
<ax21:subtype xsi:nil="true" />
<ax21:type xsi:nil="true" />
</ns:return>
</ns:getMyObjectResponse>
</soapenv:Body>
</soapenv:Envelope>Thanks!
Edited by: user9257993 on 19/Abr/2011 2:46
Similar Messages
-
Keystroke response time very slow
This problem seems to be getting worse.
It is not application dependent.
I'll start typing and no on screen response. I'll continue to type and it will "catch up."
I do use a wireless keyboard.
Any suggestions appreciated.Hi Norm,
I know it can be annoying to have your Mac's keyboard be unresponsive for intervals such as you describe. I would suggest that you troubleshoot using the steps in this article -
Troubleshooting wireless mouse and keyboard issues
In particular the section labeled Keyboard or mouse intermittently stops responding.
Thanks for using Apple Support Communities.
Best,
Brett L -
Response time too slow when there is competition in the same connector PCo
Dear all, I'm having a problem with using PCo 2.1.
I created all the conections in PCo with OSIsoft PI and when I create a TagQuery
on MII to get the values of a tag is not occur problem in response time.
But when I have another TagQuery or Transaction, which is collecting data at the same
time, sharing the same connector, the time response is very slow.
Using the UDS this problem does not happen.
So problem is that when there is competition in the same connector, the response time is extremely slow.
Has anyone experienced this?
Regards!Hi Udayan,
Thanks again for attention,
I found this problem on the two MII versions, 12.0 and 12.1.
The UDS and PCo are on different servers and using different ports too.
I didn't find errors on netweaver about this, but I'll verify one more time.
On true, on version 12.0 of MII there is two connections with PI, one PCo and another UDS, that are using the same port. But this does not happen on the MII version 12.1, there I'm using different ports.
Thank you very much! -
Touch screen response time terribly slow.
My iPod Touch screen response time terribly slow.
touch screen miserably slow. resetting / restoring factory settings didnt work.Time for an appointment at the Genius Bar of an Apple store.
Apple Retail Store - Genius Bar -
Dear OTN Members
we have recently migrated our application from 6i (client/server) to 10g web based applications. I testing migrated forms on 10g but response is very slow means when i tried to traverse through menu (in our main form after successfully entering credentials in login form) they response very slow, after i click on some menu and try to open the form, it opens very slowly (doesnt show up at once). My machine specs are very good, it is server machine (IBM) with 4 gb RAM, application server is 10g, databse is 10g and developer suite is 10g. We have installed application server seperatey i.e. database is installed on seperate machine.
What can be the reason? either something wrong with application server configuration or what? Please suggest me what to do to enhance performance.
Early reply would be highly appreciated.
Regards
Nasir SaeedTry to establish the bottleneck. Is it the database or the mid-tier. Run addmrpt.sql on the database and see if any improvements need to be made. On the mid-tier side there can be several factor hampering performance: network speed, Web Cache, OHS or the OC4J instance for Forms. Have a look at metalink note 363285.1
-
Why the response is very slow when the DNS enrty of server PC is remov
Hi
Though this subject has been already discussed at many places,im unable to get the clue.Here is my problem.In my office (LAN),server and client are running at different PC.After DNS entry of server PC is removed from DNS server,the page loading and every request & response between client and server is very slow.It takes 2 minutes for each and every request.And coming to the possible solutions,is "configuring the server PC in DNS server" is the only solution?When both the server and client PCs are DNS configured i dont see any issue or slowdown.Any help would be really appreciated
Assuming it is a lookup issue,i have written the following test application.
public class DnsName
public static void main(String[] arg)
String ipaddress = "";
String hostaddress = "";
if(arg.length == 1)
ipaddress = arg[0];
else
System.out.println("!!!!!!Usage : java DnsName <ipaddress>");
System.exit(0);
System.out.println("Time before processing : " + System.currentTimeMillis());
try
hostaddress = (InetAddress.getByName(ipaddress)).getHostName();
catch(UnknownHostException uhe)
System.out.println("Exception occured " + uhe);
System.out.println("Ip address : " + ipaddress);
System.out.println("Host name : " + hostaddress);
System.out.println("Time after processing : " + System.currentTimeMillis());
When it was compiled and run on a linux PC,time difference betwwen process is around 50ms,but when the same application is run in a Windows PC,the time difference is around 4-5 seconds(4000ms).Can anyone tell me what makes the difference in Windows??
[email protected]
www.adventnet.comBecause it does a DNS lookup. And without a server, the interface must wait for a timeout.
-
Why the response is very slow when the DNS enrty of server PC is removed ??
Hi
Though this subject has been already discussed at many places,im unable to get the clue.Here is my problem.In my office (LAN),server and client are running at different PC.After DNS entry of server PC is removed from DNS server,the page loading and every request & response between client and server is very slow.It takes 2 minutes for each and every request.And coming to the possible solutions,is "configuring the server PC in DNS server" is the only solution?When both the server and client PCs are DNS configured i dont see any issue or slowdown.Any help would be really appreciated
Assuming it is a lookup issue,i have written the following test application.
public class DnsName
public static void main(String[] arg)
String ipaddress = "";
String hostaddress = "";
if(arg.length == 1)
ipaddress = arg[0];
else
System.out.println("!!!!!!Usage : java DnsName <ipaddress>");
System.exit(0);
System.out.println("Time before processing : " + System.currentTimeMillis());
try
hostaddress = (InetAddress.getByName(ipaddress)).getHostName();
catch(UnknownHostException uhe)
System.out.println("Exception occured " + uhe);
System.out.println("Ip address : " + ipaddress);
System.out.println("Host name : " + hostaddress);
System.out.println("Time after processing : " + System.currentTimeMillis());
When it was compiled and run on a linux PC,time difference betwwen process is around 50ms,but when the same application is run in a Windows PC,the time difference is around 4-5 seconds(4000ms).Can anyone tell me what makes the difference in Windows??
[email protected]
www.adventnet.comWhen you do getHostName() on an InetAddress, what you're doing is asking the OS to do a reverse lookup. So basically this is a windoze problem, not a java problem (although that probably doesn't help you much) Try searching google to see why a windows reverse lookup might be so slow and go from there.
-
Why is Oracle Response time getting slow with time.
Hi,
I have DB which was very fast initially with the response time for one of the query < 5 sec.
I have been using the DB for the last 15 days. Now the same query is taking 10 minutes. In the DB there are lot of operations of additions and deletions been done on the table where the query is being made. The no. of records in the table is constant at around 3 million records from the first day.
If I import the DB into a new setup then again the response time becomes very good in the new setup.
What should be the problem of the DB getting slow with the time.
Thanks,
TuhinIt all depends on several factors.
Are your tables,indexes have upto-date statistics?
I have DB which was very fast initially with the response time for one of the query < 5 sec. Initially there might be small amount of data later data might have increased,you dont have proper indexes.
It could be that your indexes got fragmented to due to heavey deletes? It might need reorg.
My suggestion would to look into your execution plan of the quries and see where your kernals are waiting.
As other suggested you, use explain plan, event 10046 and tkprof.
Jaffar -
Response time problems, slow excel execution with new ibook
Hello: I'm a first time ibook user (long time pc user). I have had my ibook for less than 1 month. It's sometimes very slow. I can understand a slow response when I'm accessing a website, but I don't understand why I often experience a 5-15 second delay when I'm in excel and I click on "file" or "format". (I very often get the whirly multicolored pinwheel.)
I have also had to do a "force quit" a number of times to stop an unresponsive excel model or firefox application.
I'm also very disappointed in the excel performance. I run very large excel models some of which take a minute or more to recalc on our hp pavillion pc. My new ibook, however, doesn't run these modes any faster than my 2-3 year old pc. I haven't upgraded from the standard memory and I don't know how much that would help.
Anyone have any suggestions to offer?
MikecupertinoWelcome to the Apple Discussions!
I have had my ibook for less than 1 month.
If this is the case, then you qualify to get the next version of Microsoft Office, version 2008 for free (besides shipping). Check out this Microsoft site:
http://www.microsoft.com/mac/go/promotions/supersuitedeal/
Next week there are bound to be several new announcements from all sorts of Mac-related companies at the Macworld Expo in San Francisco. Microsoft is releasing their next version of Office for the Mac next week too. This version will run natively on an Intel-based Mac. Right now, Office is running in Apple's "Rosetta" technology which emulates the older, PowerPC processors. This allows you to run applications that haven't been updated yet, but it does slow down performance and increase hardware requirements. I think you should see better performance with the updated version. (Although, there may be a few bugs to work out with the brand new version, so keep check on updates!)
-Doug -
Performance Issue - Online applications response is very slow.
Hi,
We have encountered into major performnace issue for one of our online applications.
Front End : People Soft.
Backend : Oracle 10g (10.2.0.4).
The response of the application is very slow and all the queries (firing as a job from peoplesoft) is dam slow.
When we look around the database, I could see lot of wait events, especially, "Enq:HW - Contention", which was the major wait event when we looked at the AWR report.
Other wait events are, Buffer busy waits, etc.,
Due to that the whole application is very slow and leading to down time.
Please help us to get this resolved at the earliest.Hi,
Have a look in
How To Analyze the Wait Statistic: 'enq: HW - contention' [ID 419348.1]
Also may be of help
'enq HW - contention' For Busy LOB Segment [ID 740075.1]
LOB HWM CONTENTION :Using AWR Reports to Identify the Problem; Confirm and Verify the Fix 837883.1
Bug 6376915 - HW enqueue contention for ASSM LOB segments 6376915.8
We hit the above mentioned bug once related to LOBs. It's fixed in 10.2.0.4 but you need to enable it with an event (it's on the metalink notes) -
Response time too slow.. 9i database
Hi friends,
well we have installed 9i database on our server. It was running fine for about two months. But now suddenly from yesterday the response time is toooooooooo slow. it takes a long time even to connect.
when we check the processes in task manager oracle.exe is consuing 99% cpu resources which slows down the system and response time is very slow.
how can we identify and resolve our problem. please help in details and thru commands.
Best regards,
Imran Baig
[email protected]In my opinion it is good that you check immediately the SGA.
do the following:
SQL>show parameters shared_
and see the parameter SHARED_POOL_SIZE
and contrast it with the result of this SQL:
select * from v$sgastat where name='free memory';
if the free memory is very low regarding the value
of the SHARED_POOL_SIZE parameter you can do this
to fix it without to shutdown the database:
ALTER SYSTEM FLUSH SHARED_POOL;
The others gave are good too.
Joel P�rez -
Oracle 11g database Connection & Response are very slow
I have an ORACLE 11g R2 on lRed Hat Enterprise Linux Server release 5.3 (Tikanga).
initially it was working fine.
Now a days while attempting to connect into the database from network using @service_name
it takes a lot of time to establish the connection and even it gets connected the query response time is very high.
on the other hand if I connect from the native database machine's terminal without @service_name it works fine & the response time is convincing. But even from the native database machine's terminal with @service_name it is giving me the same pain.
can any body help me how to fix this.
Thanks in advance..
Arkeshthanks for the reply & Query
Alert Log entry do look like this
ORACLE_BASE from environment = /u01/app/oracle
Thu Apr 22 07:29:10 2010
ALTER DATABASE MOUNT
Successful mount of redo thread 1, with mount id 4283520006
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE MOUNT
Thu Apr 22 07:29:15 2010
ALTER DATABASE OPEN
Beginning crash recovery of 1 threads
parallel recovery started with 7 processes
Started redo scan
Completed redo scan
read 15 KB redo, 23 data blocks need recovery
Started redo application at
Thread 1: logseq 449, block 8217
Recovery of Online Redo Log: Thread 1 Group 2 Seq 449 Reading mem 0
Mem# 0: /u01/app/oracle/oradata/ultimus/redo02.log
Completed redo application of 0.01MB
Completed crash recovery at
Thread 1: logseq 449, block 8248, scn 10502937
23 data blocks read, 23 data blocks written, 15 redo k-bytes read
Thread 1 advanced to log sequence 450 (thread open)
Thread 1 opened at log sequence 450
Current log# 3 seq# 450 mem# 0: /u01/app/oracle/oradata/ultimus/redo03.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
SMON: enabling cache recovery
Successfully onlined Undo Tablespace 2.
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is WE8MSWIN1252
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Thu Apr 22 07:29:18 2010
QMNC started with pid=27, OS id=3611
Completed: ALTER DATABASE OPEN
Thu Apr 22 07:29:20 2010
db_recovery_file_dest_size of 10240 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Thu Apr 22 07:29:20 2010
Starting background process CJQ0
Thu Apr 22 07:29:20 2010
CJQ0 started with pid=28, OS id=3817
Thu Apr 22 07:34:18 2010
Starting background process SMCO
Thu Apr 22 07:34:18 2010
SMCO started with pid=19, OS id=3861
Thu Apr 22 07:59:23 2010
Thread 1 advanced to log sequence 451 (LGWR switch)
Current log# 1 seq# 451 mem# 0: /u01/app/oracle/oradata/ultimus/redo01.log
Thu Apr 22 10:09:23 2010
DM00 started with pid=34, OS id=6272, job ULTIMUS.SYS_EXPORT_SCHEMA_01
Thu Apr 22 10:09:25 2010
DW00 started with pid=35, OS id=6274, wid=1, job ULTIMUS.SYS_EXPORT_SCHEMA_01
Thu Apr 22 10:11:20 2010
Thread 1 cannot allocate new log, sequence 452
Private strand flush not complete
Current log# 1 seq# 451 mem# 0: /u01/app/oracle/oradata/ultimus/redo01.log
Thread 1 advanced to log sequence 452 (LGWR switch)
Current log# 2 seq# 452 mem# 0: /u01/app/oracle/oradata/ultimus/redo02.log
Thu Apr 22 10:13:28 2010
DM00 started with pid=45, OS id=6395, job ULTIMUSISL.SYS_EXPORT_SCHEMA_01
Thu Apr 22 10:13:29 2010
DW00 started with pid=46, OS id=6397, wid=1, job ULTIMUSISL.SYS_EXPORT_SCHEMA_01
Thu Apr 22 10:14:29 2010
Thread 1 cannot allocate new log, sequence 453
Private strand flush not complete
Current log# 2 seq# 452 mem# 0: /u01/app/oracle/oradata/ultimus/redo02.log
Thread 1 advanced to log sequence 453 (LGWR switch)
Current log# 3 seq# 453 mem# 0: /u01/app/oracle/oradata/ultimus/redo03.log
Thu Apr 22 10:15:40 2010
DM00 started with pid=43, OS id=6432, job IULTIMUS.SYS_EXPORT_SCHEMA_01
Thu Apr 22 10:15:41 2010
DW00 started with pid=45, OS id=6434, wid=1, job IULTIMUS.SYS_EXPORT_SCHEMA_01
Thu Apr 22 10:16:38 2010
DM00 started with pid=45, OS id=6450, job ULTIMUSEXT.SYS_EXPORT_SCHEMA_01
Thu Apr 22 10:16:38 2010
DW00 started with pid=46, OS id=6452, wid=1, job ULTIMUSEXT.SYS_EXPORT_SCHEMA_01
Thu Apr 22 10:26:18 2010
Fatal NI connect error 12537, connecting to:
(LOCAL=NO)
VERSION INFORMATION:
TNS for Linux: Version 11.2.0.1.0 - Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
Time: 22-APR-2010 10:26:18
Tracing not turned on.
Tns error struct:
ns main err code: 12537
TNS-12537: TNS:connection closed
ns secondary err code: 12560
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
opiodr aborting process unknown ospid (6587) as a result of ORA-609 -
Hi
We have Oracle RAC 11g2 in windows 2008R2 in two nodes and application 6i an 10g
We use DNS and Scan name resolve to three IP address
for the 10g the operation is acceptable but for 6i is very very slow
any idea!srsatya wrote:
What is the SGA of the DB, I had the same problem, when increased the SGA it was fine. In our case we upgraded DB from 10.2.0.5 to 11gr2, it need min 3gb SGA to quicker response.And why did a larger SGA seemingly resolved your problem? Any ideas?
Do you know that a larger SGA (and thus larger Shared Pool) can actually worsen performance when the system deals with non-bind SQL parsing? Instead of increasing the db buffer cache and increasing potential logical I/O and providing associated performance gains?
Dealing with performance is more than pushing buttons and turning knobs until it is "better"... and then blindly suggested that as a solution for all performance problems.
How about reading Oracle® Database Performance Tuning Guide? And pay special attention to +1.1.2.3 The Symptoms and the Problems+:
>
A common pitfall in performance tuning is to mistake the symptoms of a problem for the actual problem itself. It is important to recognize that many performance statistics indicate the symptoms, and that identifying the symptom is not sufficient data to implement a remedy -
Response time Extremely slow on MS Translator API
Hi,
I am now using Translator API to translate input data from users in real time.
But I found that the response time from the API is sometimes extremely slow.
--- It takes 1 to 2 minute to translate only 5 to 6 characters and it certainly slow down my application
(it normally takes only a few seconds)
--- I am sure that I have enough quota.
I wonder if there is request limit in a minute and if so, how can I upgrade the limit so
I can keep my service work perfectly?
ThanksHi,
This is totally unsusual. For strings in the two to three thousands characters it should not take more than a few 100ms. Can you try again and tell us if you still see this behavior?
Our service is up and running (just go to bing.com/translator and you'll be able to test for yourself the speed of translation for a several hundreds characters sentence) so I'm not sure how to help you out here if it is still the case and your internet
connection is working fine.
Olivier
Microsoft Translator team - www.microsoft.com/Translator -
Response time Extremely slow on Translator API
Hi,
I am now using Translator API to translate input data from users in real time on our web application.
But I found that the response time from the server is sometimes extremely slow.
--- It takes 1 to 2 minute to translate only 5 to 6 characters and it certainly slow down my application
(it normally takes only a few seconds)
--- I am sure that I have enough quota.
I wonder if there is request limit in a minute and if so, how can I upgrade the limit so
I can keep my service work perfectly?
ThanksHi,
This is totally unsusual. For strings in the two to three thousands characters it should not take more than a few 100ms. Can you try again and tell us if you still see this behavior?
Our service is up and running (just go to bing.com/translator and you'll be able to test for yourself the speed of translation for a several hundreds characters sentence) so I'm not sure how to help you out here if it is still the case and your internet
connection is working fine.
Olivier
Microsoft Translator team - www.microsoft.com/Translator
Maybe you are looking for
-
How can you get pics from your Camera roll to you photo stream
How can you get pics from your Camera roll to you photo stream
-
Grouping by Date Field Weekly Always starts on a Sunday, Can I change this
Post Author: mikazza CA Forum: General Hi, I have a report which groups sales by the date they were made dailly, it also has another group which sits above this and groups these same sales by week so I can get a weekly sales figure aswell. All this
-
I have a hp 1730 running vista 32 bit and a nikon d70s shooting raw. I have 2 G ram and am printing to a HP B9180pro printer. I have a W19b LCD monitor and have recently profiled both the monitor and printer with Spyder 3 studio. I have removed the o
-
i have a date column date_1 01-jan-06 19-feb-06 i want to remove the date part date_1 jan-06 feb-06
-
The may be in the doc, if so, please let me know where... Is there a preferred number of queues to a queue table metric? I would imagine the lighter the load the fewer the queue tables.... Thanks, Don.