`execSync("rover...")` causes the container to exit with 137 long after it finishes running

Hello, I’ve ran into a very strange problem. execSync("rover supergraph compose ...") causes the docker container to exit with 137 long after it finishes running.

I’ve spent weeks trying to find this line. What’s strange is:

  • The container didn’t run out of memory. (So, exit code 137 is kinda lie?)
  • execSync("rover supergraph compose ...", { stdio: "inherit" }) command finishes running without a problem. But later (like 10 seconds later) the container closes with exit code 137.

I have no idea what’s causing this problem.

supergraph.yaml example

federation_version: =2.3.1
    routing_url: http://tags-api:3302/graphql
      subgraph_url: http://tags-api:3302/graphql
    routing_url: http://contacts-api:3301/graphql
      subgraph_url: http://contacts-api:3301/graphql

Here is the actual code on github. It’s being used in a open source project. I’ve made the node process to exit on purpose. Since after running the command, the container will shut down anyway.