I've had an hourly job running the following for many months now and it's been fine until these 2 days:
try {
CoreService.getLogger(this).info("DB Backup Start...");
TypedQuery<Thread> backupQuery =
em.createQuery("objectdb backup", Thread.class);
Thread backupThread = backupQuery.getSingleResult();
backupThread.join();
CoreService.getLogger(this).info("DBService Backup DONE!");
} finally {
em.close();
}
These 2 days I notice that the server, or mainly database would start to have issues responding during the end of the backup process. e.g. The Backup usually takes about 5 minutes. When the "DB Backup Start..." starts, 2-3 minutes after I would have lots of players drop off and my server just can't respond properly when there are DB calls involved. Once the "DBService Backup DONE!" log happens, within 500ms everything goes back to normal.
As I said, this only started happening these 2 days, and only when the server is busy, e.g. the DB is getting hit harder than when it's not during the busy time of the day.
The db is working fine. But it has grown to 20gig in size with 79 million records. I don't know if it's because the size of the DB making the backup process behave badly. But for now I have schedule the backup only to 2:30am so that I get less disruption. It's not ideal so I hope you can help in trying to reproduce the issue with a large DB as I described and about 100 concurrent threads reading and writing to the DB per second.
Thanks