E

Limit Memory Usage of Buildkitd

Summary

The user is asking about limiting the maximum memory usage of buildkitd, expressing concern that it is causing issues by consuming too much memory and leading to the termination of the instance. They mention that while there may not be a straightforward way to limit memory directly on the buildkitd process, resource constraints can be applied to the container running buildkitd. The user clarifies that they are using remote earthly, not local.

Status
resolved
Tags
    Source
    #earthly
      i

      ingwar

      10/10/2024

      No its not local.. its remote earthly..

      r

      rrjjvv

      10/9/2024

      Not sure if there's a (easy/native) way to limit memory on the buildkitd process itself, but you could apply resource constraints to the container running buildkitd, which may be "close enough" for your purposes. I don't recall any knobs allowing direct control over the container config, but I do know earthly can be told to use a container of your choosing (i.e., start the buildkit container manually with memory constraints, then tell earthly to use it).

      This all assumes you're talking about 'local' earthly though.

      i

      ingwar

      10/9/2024

      Seems like our buildkit is shooting in own foot.

      INFO 2024-10-09T16:48:51.906772225Z [resource.labels.instanceId: 2076988613424152424] [389676.766850] systemd[1]: systemd-journald.service: Main process exited, code=killed, status=6/ABRT\r\n
      INFO 2024-10-09T16:48:52.468207294Z [resource.labels.instanceId: 2076988613424152424] [389677.328247] systemd[1]: systemd-journald.service: Failed with result \'watchdog\'.\r\n
      INFO 2024-10-09T16:48:59.171791126Z [resource.labels.instanceId: 2076988613424152424] [389684.031259] systemd[1]: systemd-journald.service: Consumed 36.611s CPU time.\r\n
      INFO 2024-10-09T16:50:59.162716460Z [resource.labels.instanceId: 2076988613424152424] [389804.012027] systemd[1]: systemd-journald.service: Scheduled restart job, restart counter is at 1.\r\n
      INFO 2024-10-09T16:51:26.451627123Z [resource.labels.instanceId: 2076988613424152424] [389831.298636] systemd[1]: Starting systemd-journald.service...\r\n
      INFO 2024-10-09T16:52:49.104651642Z [resource.labels.instanceId: 2076988613424152424] [389913.944653] systemd[1]: systemd-journald.service: start operation timed out. Terminating.\r\n```
      Killed whole instance..
      
      i

      ingwar

      10/9/2024

      Its possible somehow limit max memory used by buildkitd?