I'm getting an error message in my console that says [Skript variable save thread/WARN]: [Skript] Cannot write variables to the database 'default' at sufficient speed; server performance may suffer and many variables will be lost if the server crashes. (this warning will be repeated at most once every 10 seconds) I believe it is what crashed my server earlier today. Does anyone know how to fix this?
#Cannot write variables fast enough
1 messages · Page 1 of 1 (latest)
Did you make a while loop without adding wait?
his server would just instantly
crash every time
well depends on the if statement ig
if its a player online insta crash on login
if its another prob wouldn't crash until a lil while after
depends on what the if statement is
idk
Not being able to write fast enough to the .csv or whatever file is caused by attempting to save too many variables normally
ah
best fix is splitting the work flow to
Database/NBT/.dat file for player data
.csv for static never changing variables
and temp/ram vars for things you would maybe only change via on load or in on skript load
there is no good method for dealing with stuff within the variable file, you'd have to open it and figure out what variables are being saved along with what ones you don't need
out of curiosity, do you know of a way to do the playerdata one? such as what addon I'd need to do that? I'm quite interested (please ping me)
for what part of it
nbt, .dat or database?
since nbt and .dat can all be done using skbee
while database depends fully on yourself
.dat
really, SkBee? interesting
.dat files are basically nbt
Basically, my .csv is being filled up with a bunch of checkpoints of players (its on a parkour map). Is there a way to flush the variables.csv every time the server reboots?
How many players are on the server when the code is running?
Instead of setting the value of the variable how ever fast you are doing it, just do it only when they go on the checkpoint. Otherwise, why bother changing the variable at all?
he most likely is doing that as the .csv file doesn't update automatically it takes by default 2 hours between server start
start -> load -> wait 2 hours -> save -> wait 2 hours -> save *repeat
the issue is skript loads all data as it can't tell what value is needed at the time so each save he's saving all new and existing
True. Adding to the suggestion of file storage, if you can't for some reason use SkBee, you can try either SkUtilities (not recommended, but possible) or skript-yaml (highly recommended) to save the info to a yaml file, which can be read like normal (whereas .dat cannot without certain applications or in-game via an addon). I personally use yaml.
No if you can't use skbee then you give up. yaml is made for configs not player data
skUtilities guessing refering to the file modification stuff, this shouldn't even be mentioned
I was saying SkUtilites because it also has yaml syntax.
And for player data, tell that to Essentials xD
Essentials devs don't care and generally don't add a bunch of stuff. while yes yaml is fine, if you have the ability to use a database or nbt then you should.
nbt files are one of the best sterilizers and encoding stuff. a 10mb .csv file isn't even 80kb in .nbt
courtesy of ShaneBeee
10k items saved in each one