Hello
I am messing around with some database submissions of players and every so often the entire server will freeze when submitting to the database. The database is in the same DC so ping should be small.
Is there a way to efficiciently submit 200 records without breaking the server?
Database and crashing server
If you are using the official oxide API for databases, it should not. Provide more details, code
misticos
If you are using the official oxide API for databases, it should not. Provide more details, code
I create the query string first and finish with
Oxide.Core.Database.Sql.Builder.Append(
sqlQuery,
cachedPlayer.steamId,
cachedPlayer.rewardTrack.structRepairs,
cachedPlayer.rewardTrack.woodPickup,
cachedPlayer.rewardTrack.orePickup,
cachedPlayer.rewardTrack.plantsGathered,
cachedPlayer.rewardTrack.c4Detonated,
cachedPlayer.rewardTrack.satchelsDetonated,
cachedPlayer.rewardTrack.rocketsBasic,
cachedPlayer.rewardTrack.rocketsHv,
cachedPlayer.rewardTrack.playerKills,
cachedPlayer.rewardTrack.barrels,
cachedPlayer.rewardTrack.treeHits,
cachedPlayer.rewardTrack.oreHits,
cachedPlayer.rewardTrack.npcKills,
cachedPlayer.rewardTrack.animalKills,
cachedPlayer.rewardTrack.fishesFished,
cachedPlayer.rewardTrack.scrapSpent,
cachedPlayer.rewardTrack.unlockBlueprint);
sqlLibrary.Insert(insertCommand, conn);
It could be possible that I am running two database plugins, my first version updated on every hit of a node so 100s of players causing the crash. I will see how things go once I migrate over.