Closed kristinew closed 10 years ago
filecache on testing now also crashes from time to time. still not instantly reproducible, but seems always to happen while querying for expired files
$ ll filecache/shared/files | wc -l
) be a reason respectively the scheduling / some concurrency issue?client raises from time to time the following exception.
2014-03-25 18:06:07,773 [XoClient] ERROR - sql error java.sql.SQLException: Unable to run insert stmt on object com.hoccer.talk.model.TalkDelivery@1a077247: INSERT INTO `delivery` (`messageId` ,`messageTag` ,`senderId` ,`receiverId` ,`groupId` ,`state` ,`keyId` ,`keyCiphertext` ,`timeAccepted` ,`timeChanged` ,`timeUpdatedOut` ,`timeUpdatedIn` ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?) at com.j256.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22) at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:124) at com.j256.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:394) at com.j256.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:308) at com.j256.ormlite.dao.BaseDaoImpl.createOrUpdate(BaseDaoImpl.java:334) at com.hoccer.talk.client.XoClientDatabase.saveDelivery(XoClientDatabase.java:140) at com.hoccer.talk.client.XoClient.composeClientMessage(XoClient.java:1331) at com.hoccer.talk.tool.command.ClientMessage.sendMessage(ClientMessage.java:122) at com.hoccer.talk.tool.command.ClientMessage.run(ClientMessage.java:68) at com.hoccer.talk.tool.TalkToolCommand.innerExecute(TalkToolCommand.java:19) at com.hoccer.talk.tool.TalkToolCommand.innerExecute(TalkToolCommand.java:7) at better.cli.Command.execute(Command.java:38) at better.cli.CommandLineApplication.processInputLine(CommandLineApplication.java:160) at better.cli.CommandLineApplication.start(CommandLineApplication.java:92) at better.cli.EntryPoint.main(EntryPoint.java:51) at com.hoccer.talk.tool.TalkTool.main(TalkTool.java:55) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: java.sql.SQLException: generated-id key was not set by the update call at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:104) ... 19 more
still not sure why this happens. thought of: http://stackoverflow.com/questions/20820641/ormlite-throws-generated-id-key-was-not-set-by-the-update-call but could not get enough information out of database to approve. any idea?
btw: documentation on h2 db-access is here: https://github.com/hoccer/hoccer-talk-spike/wiki/_preview#manual-database-access
observed that the filecache on PRODUCTION AND TESTING got restart at exactly the same times.
that was due to a wrong configuration in the watchdog-like restart-script: the testserver script reacted also on the production filecache crash and got also restarted. @kaazoo fixed that (see cat /etc/cron.d/restart_filecache
-> cat /root/restart_filecache
). ever since the testserver did not crash again, observing...
try to crash test server to get an insight of what needs to be done to fix