• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to eliminate deadlock or timeout in a jdbc application?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,
My web application hits deadlock or timeout problems during select/insert/update/delete operation in the
database especially concurrent testing with 100 virtual users.

May I know how to avoid these two errors?

Could I said that these solutions will apply when the load volumn is 1000 users, 10000 users ...etc ?

All workable solutions are welcome.

Regards,
John
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make your transaction shorter. Committing transactions frequently would probably save you from this kinda behavior.
[ March 06, 2005: Message edited by: Adeel Ansari ]
 
John Peter
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May I know how to shorter the transaction?
Reconstruct the logic, or ?

Please enlighten me in detail. E.g: Simple code to illustrate it.

Rgds,
John
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Spider Peter",
sorry but your display name is not valid according to our name rules.

We require display names to be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Just to be clear, you cannot have the current display name and then sign it 'John'. We now require you to set the first name in your display name to 'John' and second to be your last name. 'Spider' will not be accepted.

Please edit your profile and correct your profile, since accounts with invalid display names get deleted, often without warning

thanks,
Dave
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Spider Peter:
May I know how to shorter the transaction?
Reconstruct the logic, or ?
Please enlighten me in detail. E.g: Simple code to illustrate it.



make connection.setAutoCommit(true), Or
if don't want to do with auto-commit then do commit frequently.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the name change
(It was meant to be a sad face in my previous post, not a happy face. I hope you weren't upset by my mistake!)
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at how locking is implemented on your database: row level vs. page level vs. table level. Monitor (at the database level) what threads are making requests for locks against what resources. Are locks escalating as a result? Tune the database to reduce contention. Also, create resource references for your datasources............modify the isolation level according to the nature of the work being performed to get the best performance (example: for select statements against static data, set your isolation level to be read uncommitted).

-Ed
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic