Posts: 33
Threads: 13
Joined: Oct 2018
Hello, can someone tell me why my server with SQLite saved system sometimes loses user data when disconnecting or restarting the server?
How could I solve it? and what is causing it?
I stress: This never happened to me, I had the server online before and never lost any data, it may be the attacks I'm receiving? (The attacks are DDoS with botnet)
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
Do you make queries to your db when a user disconnects?
Posts: 33
Threads: 13
Joined: Oct 2018
Quote:
Originally Posted by Pottus
Do you make queries to your db when a user disconnects?
|
Yes.
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
You just found your problem then. Saving anything other than immediately means running the risk of data loss.
Posts: 33
Threads: 13
Joined: Oct 2018
Quote:
Originally Posted by Pottus
You just found your problem then. Saving anything other than immediately means running the risk of data loss.
|
So, I should not save the data when the user disconnects, if not in another way?
Posts: 408
Threads: 40
Joined: Nov 2014
Reputation:
0
Update data when changes. User recived/lost money? Let the database know about it
Posts: 33
Threads: 13
Joined: Oct 2018