#Automatically start MongoDB with Cultivation

57 messages · Page 1 of 1 (latest)

primal bridge
#

I don't want to have MongoDB constantly running on Windows. Ideally Cultivation would automatically start MongoDB and automatically kill it when you exit the game. Is this possible? Are there any other solutions?

#

I don't want to have MongoDB constantly running on
Why?

#

It uses like 30 MB of RAM

#

because I'm not using it 99% of the time?

primal bridge
#

yeah, I know that, thanks

#

wondering if anyone else knows of an automatic solution or can tell me if it's a feature of cultivation or not

#

I'm assuming it's not a feature in cultivation then

#

No, there is not an automatic solution or feature, most people don't care about a process using 0.2% of CPU or 14 MB of RAM

primal bridge
#

ok.

#

Is your Grasscutter currently running?

#

It uses more memory when it's in use

#

no, it's not running

#

that's not what the thread is for though

#

Just manually kill the process, I don't think I've ever seen it use that much RAM under normal circumstances

#

It would use more RAM if Grasscutter is running

harsh oriole
#

No this is not a feature in Cultivation

#

Cultivation is a launcher, Grasscutter is what uses MongoDB

primal bridge
#

cultivation (has the ability to) launches grasscutter though, so it seems like a good place to add that feature

#

Possibly

harsh oriole
#

It already exists in Grasscutter's folder as part of start.cmd

primal bridge
#

I think they want the process to start when Grasscutter starts and to be killed when Grasscutter is killed

#

People post about MongoTimeoutException a lot so they must not understand start.cmd

harsh oriole
#

If you edit your start.cmd then it will auto start MongoDB on running it (starting the server) but no thing exists to kill the service auto

primal bridge
#

I don't think anyone edits that

harsh oriole
#

line 18 in start.cmd, change it to anything other than DO_NOT_CHECK_PATH

primal bridge
#

I know

#

but people post things like "why is it not working?" with no further details

#

I doubt they will understand that

#

You overestimate the average person's tech understanding

#

bro what are you going on about

harsh oriole
#

Is this possible?
Yes probably wouldn't be too difficult either

primal bridge
harsh oriole
#

But it's just not something that was valuable enough to the average user, Cultivation was originally made for people who didn't want the 'complex' original methods to run GC and connect

primal bridge
#

Could work like this:

  1. You press the button to start Grasscutter via Cultivation
  2. Cultivation looks for MongoDB service
  3. If MongoDB exists, Cultivation starts it if it's not running. If it doesn't exist, it makes the user install it.
  4. Cultivation starts Grasscutter

Then Grasscutter kills MongoDB on exit, but only if it wasn't already running when Grasscutter started (Cultivation will detect if MongoDB was running and can feed that to GC).

#

Would fix the MongoTimeoutException posts (probably)

#

imo having a rampant process running 100% of the time isn't something that should be encouraged

#

imagine if every piece of software you used did that

#

that "only" 20 MB would turn into several GB quickly

#

but I totally understand why it wasn't prioritized and why most ppl don't care

#

Yea I see

#

Well the post is now off-topic about Cultivation design/development

harsh oriole
#

it wouldn't be hard to implement so maybe I'll do that soon

primal bridge
#

one issue I could see with it is if someone happens to use mongodb for something else

primal bridge
primal bridge
#

and doesn't want it killed

harsh oriole
#

Yeah could just be a toggle in settings instead

primal bridge
#

If MongoDB was already running, then don't kill it, perhaps.

#
  • a settings tuggle
tiny crest
#

it only makes sense for database servers to be up and running consistently because they store data and the average user would usually want them to be accessible

primal bridge
#

For the people who start MongoDB only for Grasscutter, it only needs to run when Grasscutter runs.