|
Replies:
10
-
Pages:
1
-
Last Post:
Jun 8, 2009 5:41 PM
Last Post By: Raam
|
|
|
Posts:
78
Registered:
12/14/06
|
|
|
|
Toplink does not return the object sometimes - VeryHigh Volume application
Posted:
Jun 4, 2009 4:40 PM
|
|
|
|
Hi All,
Toplink version: 10.1.3.4, OAS 10.1.3.4, Oracle 10g, RedHat linux 4.0
We have a high volume application where toplink issues one of our queries like 25K times/hour.Query is a simple one querying the table based on the primary key(Id) that should return 1 object.
This query is not returning the object sometimes I should say like 200 times/hour. What bothers me is that the same query on the same Id(primary-key) returns the object another time.
I did enable the toplink logging level to FINE where I could see the SQL query getting issued to the DB, I was unsuccessful in changing the logging level to ALL to check if the object is getting returned by the toplink layer and being registered in the cache kind of details.
This is not easily re-producable as this only occurs in our Pre-Prod environment where we can simulate high volume. This completely baffles me and I am running out of ideas.
Thanks in advance.
-Ram
Edited by: Raam on Jun 4, 2009 7:41 PM
|
|
|
Posts:
427
Registered:
06/21/02
|
|
|
|
Re: Toplink does not return the object sometimes - VeryHigh Volume application
Posted:
Jun 5, 2009 6:02 AM
in response to: Raam
|
|
|
|
TopLink's most verbose logging level is FINEST. Is the object ever removed from the database? What are the cache settings for this entity class? Is this object ever modified by the application? Are you using a UnitOfWork or session to execute the query?
--Gordon
|
|
|
Posts:
229
Registered:
04/04/06
|
|
|
|
Re: Toplink does not return the object sometimes - VeryHigh Volume application
Posted:
Jun 6, 2009 7:25 AM
in response to: Raam
|
|
|
|
We did had a different concurrency issue with TopLink in the past because TopLink was not thread-safe. What we did, in our application layer encapsulating TopLink API, is to retry 3 times when the unexpected was occuring. In our situation, trying 3 times was good enough to fix all issues.
|
|
|
Posts:
78
Registered:
12/14/06
|
|
|
|
Re: Toplink does not return the object sometimes - VeryHigh Volume application
Posted:
Jun 6, 2009 4:13 PM
in response to: SebTardif
|
|
|
|
I have plans to put the re-try logic in there and see the results, I will update the thread accordingly.
Thanks for the inputs though, appreciate it.
-Ram
|
|
|
Posts:
78
Registered:
12/14/06
|
|
|
|
Re: Toplink does not return the object sometimes - VeryHigh Volume application
Posted:
Jun 6, 2009 4:15 PM
in response to: Gordon Yorke
|
|
|
|
I tried with the FINEST level but due to the volume of the application, my system crashes doing the logging.
Object is never removed from the DB but being updated by other threads.
Using UnitOfWork to execute the query, cache setting is Isolated cache.
-Ram
|
|
|
Posts:
427
Registered:
06/21/02
|
|
|
|
Re: Toplink does not return the object sometimes - VeryHigh Volume application
Posted:
Jun 8, 2009 6:13 AM
in response to: Raam
|
|
|
|
You are using only 1 thread per UnitOfWork? and you are not reusing UnitofWorks
--Gordon
|
|
|
Posts:
78
Registered:
12/14/06
|
|
|
|
Re: Toplink does not return the object sometimes - VeryHigh Volume application
Posted:
Jun 8, 2009 7:35 AM
in response to: Gordon Yorke
|
|
|
|
We are not re-using UOW.
One UOW per thread.
-Raam
|
|
|
Posts:
427
Registered:
06/21/02
|
|
|
|
Re: Toplink does not return the object sometimes - VeryHigh Volume application
Posted:
Jun 8, 2009 11:04 AM
in response to: Raam
|
|
|
|
If you are configured for an isolated cache then there should be no concurrency issues. Each thread will query the database directly and load the object into the UnitOfWork. Is there an Exception handler configured on TopLink? Are you getting a timeout exception or some other exception that is being ignored?
--Gordon
|
|
|
Posts:
78
Registered:
12/14/06
|
|
|
|
Re: Toplink does not return the object sometimes - VeryHigh Volume application
Posted:
Jun 8, 2009 12:08 PM
in response to: Gordon Yorke
|
|
|
|
We have an exception handler attached to toplink and no exception is being caught or ignored.
Like I said the same query gets executed after 3 or 4 secs and I can get the object back.
-Raam
|
|
|
Posts:
427
Registered:
06/21/02
|
|
|
|
Re: Toplink does not return the object sometimes - VeryHigh Volume application
Posted:
Jun 8, 2009 12:10 PM
in response to: Raam
|
|
|
|
Does your exception handler rethrow exceptions? There was a doc bug in the TopLink docs at one point that did not show the customer handler rethrowing the exception. The handler must rethrow the exception or the exception will be "swallowed".
--Gordon
|
|
|
Posts:
78
Registered:
12/14/06
|
|
|
|
Re: Toplink does not return the object sometimes - VeryHigh Volume application
Posted:
Jun 8, 2009 5:41 PM
in response to: Gordon Yorke
|
|
|
|
Our exception handler logs and re-throws the exception.
-Raam
|
|
|
|
Legend
|
|
Guru : 2500
- 1000000
pts
|
|
Expert : 1000
- 2499
pts
|
|
Pro : 500
- 999
pts
|
|
Journeyman : 200
- 499
pts
|
|
Newbie : 0
- 199
pts
|
|
Oracle ACE Director
|
|
Oracle ACE Member
|
|
Oracle Employee ACE
|
|
Helpful Answer
(5 pts)
|
|
Correct Answer
(10 pts)
|
|