Elasticsearch Service Keeps shutting down

When it's running Curl gives me

      "name" : "llcjg9h",
      "cluster_name" : "elasticsearch",
      "cluster_uuid" : "dIg2d9-LRt-DIRP1_P6MPg",
      "version" : {
        "number" : "6.8.12",
        "build_flavor" : "default",
        "build_type" : "deb",
        "build_hash" : "7a15d2a",
        "build_date" : "2020-08-12T07:27:20.804867Z",
        "build_snapshot" : false,
        "lucene_version" : "7.7.3",
        "minimum_wire_compatibility_version" : "5.6.0",
        "minimum_index_compatibility_version" : "5.0.0"
      "tagline" : "You Know, for Search"

However, seemingly randomly, the service just shuts down. I have allocated 1024M to the heap, and have 2G of ram. I've seen other running into the issue online, but I don't see a solution.

Is it possible that it's timing out? It only seem to happen when I'm not using it for a while.

Look at the Elasticsearch logs for clues.