Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shops deleting itself? #43

Open
Rosychu opened this issue May 15, 2018 · 11 comments
Open

Shops deleting itself? #43

Rosychu opened this issue May 15, 2018 · 11 comments

Comments

@Rosychu
Copy link

Rosychu commented May 15, 2018

I don't have any logs as there's no crashing, just the fact that some of my shops keep disappearing? Not all of them at times, but they seem to disappear for no reason, no matter the owner of it, or location sometimes, what items are in it - modded or not , or even how close it is to other shops! This has happened a few times now, even with a complete wipe of the plugin, and I'm not sure what to do. I don't know how to check the database either, so I'm not sure if they're still really there or not?
I'm sorry I don't have more to give! It just happens randomly, with random shops. Please let me know if there's anything I can offer, or give, or if I can check the databases? Thank you in advance.

I'm on 2.1.0 - SpongeAPI: 7.1.0-SNAPSHOT-06016f2 / SpongeForge: 1.12-2611-7.1.0-BETA-2990

@Zerthick
Copy link
Owner

I assume you are on PlayerShopsRPG v2.1.0? You can check the database using the h2 console http://www.h2database.com/html/download.html The file should be located in the config directory of PlayerShopsRPG and should be called data.mv.db

@Zerthick
Copy link
Owner

By the way, the jdbc url will be something like jdbc:h2:file:C:\path\to\server\config\playershopsrpg\data

@Rosychu
Copy link
Author

Rosychu commented May 16, 2018

Oh yes, v2.1.0. Thank you! I've checked the database using your instructions! They seem to just be sadly gone though, it's quite the head scratcher. I don't really know what is causing this, or what. I'm gonna try and do some tests maybe, and keeping backups ... but I'll update this if I find anything that could be causing this. If you have any ideas / stuff you'd like me to test, let me know, because I'd love to keep this plugin, it's great!

@Zerthick
Copy link
Owner

I have one possible hunch as to what might be causing it, but if I'm correct there should be some kind of error messages somewhere. The latest version of PlayerShopsRPG should be automatically saving everything to the db every 5 minutes, which is why having shops randomly dropped is strange.

@Zerthick
Copy link
Owner

Zerthick commented May 16, 2018

Also, does this occur randomly while the server is running? Or after restarts? If it's happening while the server is running that may point to an issue in my saving task. In which case you can try v0.2.0 (which doesn't have the saving task) and see if the issue persists.

@Rosychu
Copy link
Author

Rosychu commented May 20, 2018

Sorry for the lack of response, I believe it just happens after restarts?Also, I'm not 100% sure on that, but it's the pattern I've noticed. Should I still try v0.2.0 ?Also if so, when DOES it save, I guess - when the world saves, or if the server shuts down? Sorry for the probably dumb question, just trying to make sure things are backed up.

I am going to try and peer around for some error messages, do you have an example of what it might say?

@Zerthick
Copy link
Owner

v0.2.0 only saves when the server shuts down. v2.1.0 saves every 5 minutes and should save when the server shuts down. If shops are only disappearing after restarts it means that the final save when the server shuts down is not being triggered. How do you restart your servers? Are you running the /stop command, or are you just killing the process as it's running?

@Zerthick
Copy link
Owner

If there are any error messages, it should be throwing some kind of SQL error, so you can try searching for that. Also, whenever PlayerShopsRPG writes to the db, it prints to the log "Saving Shops to DB"

@Rosychu
Copy link
Author

Rosychu commented May 20, 2018

Ahh, I see. We use /stop but we have crashed/frozen the server on occasion and have had to kill it... That might be it though? I'll peek around, but I can't pin down when it happened last, so I'll keep an eye out on when/if it happens next. Now that I know how to check the database and such though, I'm just going to keep better backups.
Thank you for the help though!

@Zerthick
Copy link
Owner

If you kill it without running /stop you are essentially pulling the plug on the live server, which means any final changes won't be saved to the DB. If shops were created after the last save task was run, these will not be saved to the DB. But they would have had to have been created within roughly the last 5 mins before the crash.

@Rosychu
Copy link
Author

Rosychu commented May 21, 2018

Oh, that is weird then, that doesn't fit us at all. The shops have had at least 5 mins to save and stuff... alas I can't offer much else, thank you still! I'll update if I find anything else out for certain though. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants