my dog learned polymorphism
The moose likes JDBC and Relational Databases and the fly likes DB crashes when it's used simultaneous Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "DB crashes when it Watch "DB crashes when it New topic

DB crashes when it's used simultaneous

Svend Rost
Ranch Hand

Joined: Oct 23, 2002
Posts: 904

Im making a "back end" for an app. We have to save information about a
person(id,name,value). It should be possible to insert and update a persons
record, and return the 10 most valuable persons in the DB. Please note, that
im using .asp (yes yes, I know ) and the DB is Access. Im
posting here, because 1) im a Java dev., 2) because this might be of general interest and ummm, 3) because I don't know any asp boards.

Anyways.. A typical run is like this: you contact the server, and depending
on the request the server calls eighter, the MakeRecord, UpdateRecord or PrintTop10 function.

Atm. im making a "stress test" (a simple Java program), and when run from one computer there's no
problems, but when I turn on several computers, the DB crashes. When I use two computers
it seems to work "ok", even though one of the computers cast an exception
with HTTP response code: 500, and after a while I get a HTTP response code: 4403
I guess that's because the server crashes, since the same thing happends (code 500 -> code 403 | ok run).
when e.g. three computers are beeing used. As a side note, after a "stress thread"
is beeing invoked the main prog. sleeps for 150 - 1000 ms.

When im updating or inserting, im setting a lock on the DB, and therefor
it makes sence, that I get an exception when several tries to get access
to the DB, but it also crashes when I simply "print the 10 best persons"
(that is, "SELECT TOP 10 * FROM player ORDER BY player.score DESC;").

Pointers, ect. ?

Thanks in advance,

/Svend Rost
[ May 10, 2005: Message edited by: Svend Rost ]
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

I'm afraid to say that the simple answer is change Databases. Access is not a very good DB, and suffers "issues" with concurrent access.

(BTW - you might try MSDN for your Microsoft questions. Not that people here will probably mind answering them, just you are far more likely to get a better response. )

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: DB crashes when it's used simultaneous
jQuery in Action, 3rd edition