# Clickhouse deployment with additional configs

**URL:** <https://community.fly.io/t/clickhouse-deployment-with-additional-configs/25955>\
**Category:** Questions / Help\
**Tags:** databases, login-only\
**Created:** [September 16, 2025, 1:42pm UTC](https://community.fly.io/t/clickhouse-deployment-with-additional-configs/25955 "2025-09-16T13:42:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![puneethkumarvh](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@puneethkumarvh](https://community.fly.io/u/puneethkumarvh)\
**Post date:** [September 16, 2025, 1:42pm UTC](https://community.fly.io/t/clickhouse-deployment-with-additional-configs/25955/1 "2025-09-16T13:42:18Z")

</div>

Hi, I am trying to deploy ClickHouse database using custom docker file. When the config file is empty, the deployment is happening well and I am able to use the database. When I add any configurations (as recommended by ClickHouse for lower memory usage [Usage Recommendations | ClickHouse Docs](https://clickhouse.com/docs/operations/tips) ) I am getting Out of memory issue and unable to use the database as the server is unable to run due to OOM. What is the cause of this issue? Please guide me add these configs using custom docker .

 ![Screenshot 2025-09-16 at 7.02.46 PM](https://global.discourse-cdn.com/fly1/original/3X/d/c/dc7cd6da3cad4b3935e5330972f1629b99ea4e90.png)

 ![Screenshot 2025-09-16 at 7.02.53 PM](https://global.discourse-cdn.com/fly1/original/3X/d/d/ddacee1dcba5d81b4c1dc013c6c52ad77d14e690.png)

```auto
Attaching logs here :2025-09-16T10:20:51Z app[080e6e4f543968] sin [info] INFO Checking filesystem on /var/lib/clickhouse

```

```auto
2025-09-16T10:20:51Z app[080e6e4f543968] sin [info]/dev/vdc: clean, 6375/261120 files, 44370/1047552 blocks

```

```auto
2025-09-16T10:20:51Z app[080e6e4f543968] sin [info] INFO Mounting /dev/vdc at /var/lib/clickhouse w/ uid: 101, gid: 101 and chmod 0755

```

```auto
2025-09-16T10:20:51Z app[080e6e4f543968] sin [info] INFO Resized /var/lib/clickhouse to 4290772992 bytes

```

```auto
2025-09-16T10:20:51Z app[080e6e4f543968] sin [info] INFO Preparing to run: `/entrypoint.sh` as clickhouse

```

```auto
2025-09-16T10:20:51Z app[080e6e4f543968] sin [info] INFO [fly api proxy] listening at /.fly/api

```

```auto
2025-09-16T10:20:51Z runner[080e6e4f543968] sin [info]Machine started in 1.123s

```

```auto
2025-09-16T10:20:51Z app[080e6e4f543968] sin [info]2025/09/16 10:20:51 INFO SSH listening listen_address=[fdaa:1a:aa0a:a7b:fe:e4ad:7e3d:2]:22

```

```auto
2025-09-16T10:21:01Z runner[080e6e4f543968] sin [info]Pulling container image registry.fly.io/clickhouse-snow-2683@sha256:d4abba2bc5c74cdc5bf3d2f1aa85fdb8797f3c2e51035764062d178046788f3c

```

```auto
2025-09-16T10:21:04Z runner[080e6e4f543968] sin [info]Successfully prepared image registry.fly.io/clickhouse-snow-2683@sha256:d4abba2bc5c74cdc5bf3d2f1aa85fdb8797f3c2e51035764062d178046788f3c (2.724769822s)

```

```auto
2025-09-16T10:21:04Z runner[080e6e4f543968] sin [info]Setting up volume ‘clickhouse_data’

```

```auto
2025-09-16T10:21:04Z runner[080e6e4f543968] sin [info]Opening encrypted volume

```

```auto
2025-09-16T10:21:04Z runner[080e6e4f543968] sin [info]Configuring firecracker

```

```auto
2025-09-16T10:21:04Z app[080e6e4f543968] sin [info] INFO Sending signal SIGINT to main child process w/ PID 642

```

```auto
2025-09-16T10:21:05Z app[080e6e4f543968] sin [info]/entrypoint.sh: neither CLICKHOUSE_USER nor CLICKHOUSE_PASSWORD is set, disabling network access for user ‘default’

```

```auto
2025-09-16T10:21:05Z app[080e6e4f543968] sin [info]ClickHouse Database directory appears to contain a database; Skipping initialization

```

```auto
2025-09-16T10:21:06Z app[080e6e4f543968] sin [info]Processing configuration file ‘/etc/clickhouse-server/config.xml’.

```

```auto
2025-09-16T10:21:06Z app[080e6e4f543968] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/docker_related_config.xml’.

```

```auto
2025-09-16T10:21:06Z app[080e6e4f543968] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/low-memory-config.xml’.

```

```auto
2025-09-16T10:21:06Z app[080e6e4f543968] sin [info]Logging trace to /dev/stdout

```

```auto
2025-09-16T10:21:06Z app[080e6e4f543968] sin [info] INFO Sending signal SIGTERM to main child process w/ PID 642

```

```auto
2025-09-16T10:21:06Z app[080e6e4f543968] sin [info] INFO Main child exited with signal (with signal ‘SIGTERM’, core dumped? false)

```

```auto
2025-09-16T10:21:06Z app[080e6e4f543968] sin [info] INFO Starting clean up.

```

```auto
2025-09-16T10:21:07Z app[080e6e4f543968] sin [info] INFO Umounting /dev/vdc from /var/lib/clickhouse

```

```auto
2025-09-16T10:21:07Z app[080e6e4f543968] sin [info] WARN could not unmount /rootfs: EINVAL: Invalid argument

```

```auto
2025-09-16T10:21:07Z app[080e6e4f543968] sin [info][16.823068] reboot: Restarting system

```

```auto
2025-09-16T10:21:08Z app[080e6e4f543968] sin [info]2025-09-16T10:21:08.020731853 [01K590NH1NW0SEEM1459D47Z7T:main] Running Firecracker v1.12.1

```

```auto
2025-09-16T10:21:08Z app[080e6e4f543968] sin [info]2025-09-16T10:21:08.020879926 [01K590NH1NW0SEEM1459D47Z7T:main] Listening on API socket (“/fc.sock”).

```

```auto
2025-09-16T10:21:08Z app[080e6e4f543968] sin [info] INFO Starting init (commit: 31d31a51)…

```

```auto
2025-09-16T10:21:08Z app[080e6e4f543968] sin [info] INFO Checking filesystem on /var/lib/clickhouse

```

```auto
2025-09-16T10:21:08Z app[080e6e4f543968] sin [info]/dev/vdc: clean, 6375/261120 files, 44370/1047552 blocks

```

```auto
2025-09-16T10:21:08Z app[080e6e4f543968] sin [info] INFO Mounting /dev/vdc at /var/lib/clickhouse w/ uid: 101, gid: 101 and chmod 0755

```

```auto
2025-09-16T10:21:08Z app[080e6e4f543968] sin [info] INFO Resized /var/lib/clickhouse to 4290772992 bytes

```

```auto
2025-09-16T10:21:08Z app[080e6e4f543968] sin [info] INFO Preparing to run: `/entrypoint.sh` as clickhouse

```

```auto
2025-09-16T10:21:08Z app[080e6e4f543968] sin [info] INFO [fly api proxy] listening at /.fly/api

```

```auto
2025-09-16T10:21:09Z runner[080e6e4f543968] sin [info]Machine created and started in 7.616s

```

```auto
2025-09-16T10:21:09Z app[080e6e4f543968] sin [info]2025/09/16 10:21:09 INFO SSH listening listen_address=[fdaa:1a:aa0a:a7b:fe:e4ad:7e3d:2]:22

```

```auto
2025-09-16T10:21:17Z app[080e6e4f543968] sin [info]2025/09/16 10:21:17 INFO New SSH session email=puneeth.kumar@codemancers.com verified=true

```

```auto
2025-09-16T10:21:17Z app[080e6e4f543968] sin [info]/entrypoint.sh: neither CLICKHOUSE_USER nor CLICKHOUSE_PASSWORD is set, disabling network access for user ‘default’

```

```auto
2025-09-16T10:21:17Z app[080e6e4f543968] sin [info]ClickHouse Database directory appears to contain a database; Skipping initialization

```

```auto
2025-09-16T10:21:17Z app[080e6e4f543968] sin [info]Processing configuration file ‘/etc/clickhouse-server/config.xml’.

```

```auto
2025-09-16T10:21:17Z app[080e6e4f543968] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/docker_related_config.xml’.

```

```auto
2025-09-16T10:21:17Z app[080e6e4f543968] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/low-memory-config.xml’.

```

```auto
2025-09-16T10:21:17Z app[080e6e4f543968] sin [info]Logging trace to /var/log/clickhouse-server/clickhouse-server.log

```

```auto
2025-09-16T10:21:17Z app[080e6e4f543968] sin [info]Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log

```

```auto
2025-09-16T10:23:44Z runner[080e6e4f543968] sin [info]Pulling container image docker-hub-mirror.fly.io/library/clickhouse@sha256:4643fe917573fe06f4c8dd4dfadef5d3ebe7151ed4b96f611c61d763e3748ebf

```

```auto
2025-09-16T10:23:44Z runner[080e6e4f543968] sin [info]Container image docker-hub-mirror.fly.io/library/clickhouse@sha256:4643fe917573fe06f4c8dd4dfadef5d3ebe7151ed4b96f611c61d763e3748ebf already prepared

```

```auto
2025-09-16T10:23:44Z runner[080e6e4f543968] sin [info]Setting up volume ‘clickhouse_data’

```

```auto
2025-09-16T10:23:44Z runner[080e6e4f543968] sin [info]Opening encrypted volume

```

```auto
2025-09-16T10:23:44Z runner[080e6e4f543968] sin [info]Configuring firecracker

```

```auto
2025-09-16T10:23:44Z app[080e6e4f543968] sin [info] INFO Sending signal SIGINT to main child process w/ PID 638

```

```auto
2025-09-16T10:23:49Z app[080e6e4f543968] sin [info] INFO Sending signal SIGTERM to main child process w/ PID 638

```

```auto
2025-09-16T10:23:50Z app[080e6e4f543968] sin [info] INFO Main child exited normally with code: 143

```

```auto
2025-09-16T10:23:50Z app[080e6e4f543968] sin [info] INFO Starting clean up.

```

```auto
2025-09-16T10:23:50Z app[080e6e4f543968] sin [info] INFO Umounting /dev/vdc from /var/lib/clickhouse

```

```auto
2025-09-16T10:23:51Z app[080e6e4f543968] sin [info] WARN could not unmount /rootfs: EINVAL: Invalid argument

```

```auto
2025-09-16T10:23:51Z app[080e6e4f543968] sin [info][163.221583] reboot: Restarting system

```

```auto
2025-09-16T10:23:52Z app[080e6e4f543968] sin [info]2025-09-16T10:23:52.031891782 [01K590TFW49T6BHXXXQZQGVF60:main] Running Firecracker v1.12.1

```

```auto
2025-09-16T10:23:52Z app[080e6e4f543968] sin [info]2025-09-16T10:23:52.032011934 [01K590TFW49T6BHXXXQZQGVF60:main] Listening on API socket (“/fc.sock”).

```

```auto
2025-09-16T10:23:52Z app[080e6e4f543968] sin [info] INFO Starting init (commit: 31d31a51)…

```

```auto
2025-09-16T10:23:52Z app[080e6e4f543968] sin [info] INFO Checking filesystem on /var/lib/clickhouse

```

```auto
2025-09-16T10:23:52Z app[080e6e4f543968] sin [info]/dev/vdc: clean, 2909/261120 files, 35584/1047552 blocks

```

```auto
2025-09-16T10:23:52Z app[080e6e4f543968] sin [info] INFO Mounting /dev/vdc at /var/lib/clickhouse w/ uid: 0, gid: 0 and chmod 0755

```

```auto
2025-09-16T10:23:52Z app[080e6e4f543968] sin [info] INFO Resized /var/lib/clickhouse to 4290772992 bytes

```

```auto
2025-09-16T10:23:53Z app[080e6e4f543968] sin [info] INFO Preparing to run: `/entrypoint.sh` as root

```

```auto
2025-09-16T10:23:53Z app[080e6e4f543968] sin [info] INFO [fly api proxy] listening at /.fly/api

```

```auto
2025-09-16T10:23:53Z runner[080e6e4f543968] sin [info]Machine created and started in 9.086s

```

```auto
2025-09-16T10:23:53Z app[080e6e4f543968] sin [info]2025/09/16 10:23:53 INFO SSH listening listen_address=[fdaa:1a:aa0a:a7b:fe:e4ad:7e3d:2]:22

```

```auto
2025-09-16T10:24:01Z app[080e6e4f543968] sin [info]/entrypoint.sh: neither CLICKHOUSE_USER nor CLICKHOUSE_PASSWORD is set, disabling network access for user ‘default’

```

```auto
2025-09-16T10:24:01Z app[080e6e4f543968] sin [info]ClickHouse Database directory appears to contain a database; Skipping initialization

```

```auto
2025-09-16T10:24:01Z app[080e6e4f543968] sin [info]Processing configuration file ‘/etc/clickhouse-server/config.xml’.

```

```auto
2025-09-16T10:24:01Z app[080e6e4f543968] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/docker_related_config.xml’.

```

```auto
2025-09-16T10:24:01Z app[080e6e4f543968] sin [info]Logging trace to /var/log/clickhouse-server/clickhouse-server.log

```

```auto
2025-09-16T10:24:01Z app[080e6e4f543968] sin [info]Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log

```

---

<div class="post-metadata">

**Author:** ![halfer](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@halfer](https://community.fly.io/u/halfer)\
**Post date:** [September 16, 2025, 10:53pm UTC](https://community.fly.io/t/clickhouse-deployment-with-additional-configs/25955/2 "2025-09-16T22:53:55Z")

</div>

What size machine have you specified in your TOML? Is it large enough to run this application?

---

<div class="post-metadata">

**Author:** ![halfer](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@halfer](https://community.fly.io/u/halfer)\
**Post date:** [September 16, 2025, 11:05pm UTC](https://community.fly.io/t/clickhouse-deployment-with-additional-configs/25955/3 "2025-09-16T23:05:44Z")

</div>

It doesn’t look like you’ve followed the low-mem instructions regarding your config. The XML config format is [documented here](https://clickhouse.com/docs/operations/configuration-files). It looks like you need to set custom values for `max_block_size`, `max_download_threads`, etc. I assume the top-level element should be `clickhouse`, though you have `yandex` in your screenshot.

---

<div class="post-metadata">

**Author:** ![puneethkumarvh](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@puneethkumarvh](https://community.fly.io/u/puneethkumarvh)\
**Post date:** [September 18, 2025, 5:07am UTC](https://community.fly.io/t/clickhouse-deployment-with-additional-configs/25955/4 "2025-09-18T05:07:35Z")

</div>

I tried using clickhouse as top level element, still same issue.

 ![Screenshot 2025-09-18 at 10.24.19 AM](https://global.discourse-cdn.com/fly1/original/3X/a/8/a84bfbf265ceaf60f647c18ec06f5dc3e4c64ddd.png)

Below are the logs,

2025-09-17T19:33:33Z app[56837171a57738] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/low-memory-config.xml’.  
2025-09-17T19:33:33Z app[56837171a57738] sin [info]Logging trace to /var/log/clickhouse-server/clickhouse-server.log  
2025-09-17T19:33:33Z app[56837171a57738] sin [info]Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log  
2025-09-17T19:33:38Z app[56837171a57738] sin [info] INFO Main child exited normally with code: 137  
2025-09-17T19:33:38Z app[56837171a57738] sin [info] INFO Starting clean up.  
2025-09-17T19:33:38Z app[56837171a57738] sin [info] INFO Umounting /dev/vdc from /var/lib/clickhouse  
2025-09-17T19:33:38Z app[56837171a57738] sin [info] WARN could not unmount /rootfs: EINVAL: Invalid argument  
2025-09-17T19:33:38Z app[56837171a57738] sin [info][28.043805] reboot: Restarting system  
2025-09-17T19:33:39Z runner[56837171a57738] sin [info]machine has reached its max restart count of 10  
2025-09-18T04:56:28Z runner[56837171a57738] sin [info]Pulling container image [registry.fly.io/clickhouse-test-2683@sha256:605d142f3b01990aaf3951da8b8cd88de9dae0139a5b691724e9b8f494aa5932](http://registry.fly.io/clickhouse-test-2683@sha256:605d142f3b01990aaf3951da8b8cd88de9dae0139a5b691724e9b8f494aa5932)  
2025-09-18T04:56:33Z runner[56837171a57738] sin [info]Successfully prepared image [registry.fly.io/clickhouse-test-2683@sha256:605d142f3b01990aaf3951da8b8cd88de9dae0139a5b691724e9b8f494aa5932](http://registry.fly.io/clickhouse-test-2683@sha256:605d142f3b01990aaf3951da8b8cd88de9dae0139a5b691724e9b8f494aa5932) (4.920631974s)  
2025-09-18T04:56:33Z runner[56837171a57738] sin [info]Setting up volume ‘clickhouse\_data\_fresh’  
2025-09-18T04:56:33Z runner[56837171a57738] sin [info]Opening encrypted volume  
2025-09-18T04:56:34Z runner[56837171a57738] sin [info]Configuring firecracker  
2025-09-18T05:02:39Z app[56837171a57738] sin [info]2025-09-18T05:02:39.055828488 [01K5DJWP4M4565H9AF1H3N553N:main] Running Firecracker v1.12.1  
2025-09-18T05:02:39Z app[56837171a57738] sin [info]2025-09-18T05:02:39.056191383 [01K5DJWP4M4565H9AF1H3N553N:main] Listening on API socket (“/fc.sock”).  
2025-09-18T05:02:40Z app[56837171a57738] sin [info] INFO Starting init (commit: 12601cc)…  
2025-09-18T05:02:40Z app[56837171a57738] sin [info] INFO Checking filesystem on /var/lib/clickhouse  
2025-09-18T05:02:40Z app[56837171a57738] sin [info]/dev/vdc: clean, 4005/64512 files, 24890/258048 blocks  
2025-09-18T05:02:40Z app[56837171a57738] sin [info] INFO Mounting /dev/vdc at /var/lib/clickhouse w/ uid: 101, gid: 101 and chmod 0755  
2025-09-18T05:02:40Z app[56837171a57738] sin [info] INFO Resized /var/lib/clickhouse to 1056964608 bytes  
2025-09-18T05:02:40Z app[56837171a57738] sin [info] INFO Preparing to run: `/entrypoint.sh` as clickhouse  
2025-09-18T05:02:40Z app[56837171a57738] sin [info] INFO [fly api proxy] listening at /.fly/api  
2025-09-18T05:02:40Z runner[56837171a57738] sin [info]Machine started in 1.388s  
2025-09-18T05:02:40Z app[56837171a57738] sin [info]2025/09/18 05:02:40 INFO SSH listening listen\_address=[fdaa:1a:aa0a:a7b:565:96ad:e708:2]:22  
2025-09-18T05:02:48Z app[56837171a57738] sin [info]/entrypoint.sh: create new user ‘default’ instead ‘default’  
2025-09-18T05:02:48Z app[56837171a57738] sin [info]ClickHouse Database directory appears to contain a database; Skipping initialization  
2025-09-18T05:02:48Z app[56837171a57738] sin [info]Processing configuration file ‘/etc/clickhouse-server/config.xml’.  
2025-09-18T05:02:48Z app[56837171a57738] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/docker\_related\_config.xml’.  
2025-09-18T05:02:48Z app[56837171a57738] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/low-memory-config.xml’.  
2025-09-18T05:02:48Z app[56837171a57738] sin [info]Logging trace to /var/log/clickhouse-server/clickhouse-server.log  
2025-09-18T05:02:48Z app[56837171a57738] sin [info]Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log  
2025-09-18T05:02:53Z app[56837171a57738] sin [info] INFO Main child exited normally with code: 137  
2025-09-18T05:02:53Z app[56837171a57738] sin [info] INFO Starting clean up.  
2025-09-18T05:02:53Z app[56837171a57738] sin [info] INFO Umounting /dev/vdc from /var/lib/clickhouse  
2025-09-18T05:02:53Z app[56837171a57738] sin [info] WARN could not unmount /rootfs: EINVAL: Invalid argument  
2025-09-18T05:02:53Z app[56837171a57738] sin [info][14.135386] reboot: Restarting system  
2025-09-18T05:02:54Z app[56837171a57738] sin [info]2025-09-18T05:02:54.762693593 [01K5DJWP4M4565H9AF1H3N553N:main] Running Firecracker v1.12.1  
2025-09-18T05:02:54Z app[56837171a57738] sin [info]2025-09-18T05:02:54.762894770 [01K5DJWP4M4565H9AF1H3N553N:main] Listening on API socket (“/fc.sock”).  
2025-09-18T05:02:55Z app[56837171a57738] sin [info] INFO Starting init (commit: 12601cc)…  
2025-09-18T05:02:55Z app[56837171a57738] sin [info] INFO Checking filesystem on /var/lib/clickhouse  
2025-09-18T05:02:55Z app[56837171a57738] sin [info]/dev/vdc: clean, 4005/64512 files, 24890/258048 blocks  
2025-09-18T05:02:55Z app[56837171a57738] sin [info] INFO Mounting /dev/vdc at /var/lib/clickhouse w/ uid: 101, gid: 101 and chmod 0755  
2025-09-18T05:02:55Z app[56837171a57738] sin [info] INFO Resized /var/lib/clickhouse to 1056964608 bytes  
2025-09-18T05:02:55Z app[56837171a57738] sin [info] INFO Preparing to run: `/entrypoint.sh` as clickhouse  
2025-09-18T05:02:55Z app[56837171a57738] sin [info] INFO [fly api proxy] listening at /.fly/api  
2025-09-18T05:02:55Z runner[56837171a57738] sin [info]Machine started in 1.482s  
2025-09-18T05:02:56Z app[56837171a57738] sin [info]2025/09/18 05:02:56 INFO SSH listening listen\_address=[fdaa:1a:aa0a:a7b:565:96ad:e708:2]:22  
2025-09-18T05:03:04Z app[56837171a57738] sin [info]/entrypoint.sh: create new user ‘default’ instead ‘default’  
2025-09-18T05:03:04Z app[56837171a57738] sin [info]ClickHouse Database directory appears to contain a database; Skipping initialization  
2025-09-18T05:03:04Z app[56837171a57738] sin [info]Processing configuration file ‘/etc/clickhouse-server/config.xml’.  
2025-09-18T05:03:04Z app[56837171a57738] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/docker\_related\_config.xml’.  
2025-09-18T05:03:04Z app[56837171a57738] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/low-memory-config.xml’.  
2025-09-18T05:03:04Z app[56837171a57738] sin [info]Logging trace to /var/log/clickhouse-server/clickhouse-server.log  
2025-09-18T05:03:04Z app[56837171a57738] sin [info]Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log  
2025-09-18T05:03:08Z app[56837171a57738] sin [info] INFO Main child exited normally with code: 137  
2025-09-18T05:03:08Z app[56837171a57738] sin [info] INFO Starting clean up.  
2025-09-18T05:03:09Z app[56837171a57738] sin [info] INFO Umounting /dev/vdc from /var/lib/clickhouse  
2025-09-18T05:03:09Z app[56837171a57738] sin [info] WARN could not unmount /rootfs: EINVAL: Invalid argument  
2025-09-18T05:03:09Z app[56837171a57738] sin [info][14.197069] reboot: Restarting system  
2025-09-18T05:03:10Z app[56837171a57738] sin [info]2025-09-18T05:03:10.478079072 [01K5DJWP4M4565H9AF1H3N553N:main] Running Firecracker v1.12.1  
2025-09-18T05:03:10Z app[56837171a57738] sin [info]2025-09-18T05:03:10.478449376 [01K5DJWP4M4565H9AF1H3N553N:main] Listening on API socket (“/fc.sock”).  
2025-09-18T05:03:11Z app[56837171a57738] sin [info] INFO Starting init (commit: 12601cc)…  
2025-09-18T05:03:11Z app[56837171a57738] sin [info] INFO Checking filesystem on /var/lib/clickhouse  
2025-09-18T05:03:11Z app[56837171a57738] sin [info]/dev/vdc: clean, 4005/64512 files, 24890/258048 blocks  
2025-09-18T05:03:11Z app[56837171a57738] sin [info] INFO Mounting /dev/vdc at /var/lib/clickhouse w/ uid: 101, gid: 101 and chmod 0755  
2025-09-18T05:03:11Z app[56837171a57738] sin [info] INFO Resized /var/lib/clickhouse to 1056964608 bytes  
2025-09-18T05:03:11Z app[56837171a57738] sin [info] INFO Preparing to run: `/entrypoint.sh` as clickhouse  
2025-09-18T05:03:11Z app[56837171a57738] sin [info] INFO [fly api proxy] listening at /.fly/api  
2025-09-18T05:03:11Z runner[56837171a57738] sin [info]Machine started in 1.446s  
2025-09-18T05:03:11Z app[56837171a57738] sin [info]2025/09/18 05:03:11 INFO SSH listening listen\_address=[fdaa:1a:aa0a:a7b:565:96ad:e708:2]:22  
2025-09-18T05:04:35Z app[56837171a57738] sin [info]/entrypoint.sh: create new user ‘default’ instead ‘default’  
2025-09-18T05:04:35Z app[56837171a57738] sin [info]ClickHouse Database directory appears to contain a database; Skipping initialization  
2025-09-18T05:04:36Z app[56837171a57738] sin [info]Processing configuration file ‘/etc/clickhouse-server/config.xml’.  
2025-09-18T05:04:36Z app[56837171a57738] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/docker\_related\_config.xml’.  
2025-09-18T05:04:36Z app[56837171a57738] sin [info]Merging configuration file ‘/etc/clickhouse-server/config.d/low-memory-config.xml’.  
2025-09-18T05:04:36Z app[56837171a57738] sin [info]Logging trace to /var/log/clickhouse-server/clickhouse-server.log  
2025-09-18T05:04:36Z app[56837171a57738] sin [info]Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log  
2025-09-18T05:04:41Z app[56837171a57738] sin [info] INFO Main child exited normally with code: 137  
2025-09-18T05:04:41Z app[56837171a57738] sin [info] INFO Starting clean up.  
2025-09-18T05:04:41Z app[56837171a57738] sin [info] INFO Umounting /dev/vdc from /var/lib/clickhouse  
2025-09-18T05:04:41Z app[56837171a57738] sin [info] WARN could not unmount /rootfs: EINVAL: Invalid argument  
2025-09-18T05:04:41Z app[56837171a57738] sin [info][30.004571] reboot: Restarting system  
2025-09-18T05:04:45Z app[56837171a57738] sin [info]2025-09-18T05:04:45.217188318 [01K5DJWP4M4565H9AF1H3N553N:main] Running Firecracker v1.12.1  
2025-09-18T05:04:45Z app[56837171a57738] sin [info]2025-09-18T05:04:45.217382835 [01K5DJWP4M4565H9AF1H3N553N:main] Listening on API socket (“/fc.sock”).  
2025-09-18T05:04:46Z app[56837171a57738] sin [info] INFO Starting init (commit: 12601cc)…  
2025-09-18T05:04:47Z app[56837171a57738] sin [info] INFO Checking filesystem on /var/lib/clickhouse  
2025-09-18T05:04:47Z app[56837171a57738] sin [info]/dev/vdc: clean, 4005/64512 files, 24890/258048 blocks  
2025-09-18T05:04:47Z app[56837171a57738] sin [info] INFO Mounting /dev/vdc at /var/lib/clickhouse w/ uid: 101, gid: 101 and chmod 0755  
2025-09-18T05:04:47Z app[56837171a57738] sin [info] INFO Resized /var/lib/clickhouse to 1056964608 bytes  
2025-09-18T05:04:47Z app[56837171a57738] sin [info] INFO Preparing to run: `/entrypoint.sh` as clickhouse  
2025-09-18T05:04:47Z app[56837171a57738] sin [info] INFO [fly api proxy] listening at /.fly/api  
2025-09-18T05:04:47Z runner[56837171a57738] sin [info]Machine started in 2.665s  
2025-09-18T05:04:52Z app[56837171a57738] sin [info]2025/09/18 05:04:52 INFO SSH listening listen\_address=[fdaa:1a:aa0a:a7b:565:96ad:e708:2]:22

---

<div class="post-metadata">

**Author:** ![puneethkumarvh](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@puneethkumarvh](https://community.fly.io/u/puneethkumarvh)\
**Post date:** [September 18, 2025, 5:12am UTC](https://community.fly.io/t/clickhouse-deployment-with-additional-configs/25955/5 "2025-09-18T05:12:29Z")

</div>

2Gb memory, it runs well when we use docker image directly in fly.toml file. When we use custom docker file and have those additional configs, we are having the issue.

---

<div class="post-metadata">

**Author:** ![halfer](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@halfer](https://community.fly.io/u/halfer)\
**Post date:** [September 18, 2025, 7:36pm UTC](https://community.fly.io/t/clickhouse-deployment-with-additional-configs/25955/6 "2025-09-18T19:36:14Z")

</div>

Well, keep trying then. Reduce the numbers and see what effect that has. Increase the 2Gb RAM to 4 GB or 8 GB, etc. Are you monitoring your machine for CPU and RAM usage over time? Is swap space kicking in? What are your load averages from `top`? What’s `free -h` telling you?

Your first link indicates that:

> The recommended amount of RAM is 32 GB or more.

Moreover, it has special recommendations for using less than 16 GB. I wonder if this just isn’t going to run in 2 GB.

(Tips for posting technical questions on forums: don’t post code/config/logs as images, as they aren’t compatible with clipboards. When posting code/config/logs, consider using Markdown formatting so they are rendered in monospace. You’ll find that more people will help if you follow these suggestions.)

---

<div class="post-metadata">

**Author:** ![halfer](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@halfer](https://community.fly.io/u/halfer)\
**Post date:** [September 18, 2025, 7:42pm UTC](https://community.fly.io/t/clickhouse-deployment-with-additional-configs/25955/7 "2025-09-18T19:42:51Z")

</div>

> [@puneethkumarvh](#):
>
> it runs well when we use [Docker] image directly in fly.toml file. When we use custom [Docker] file and have those additional configs

Don’t just copy-paste them in; maybe introduce one at a time, and find out methodically what effect it has. I personally doubt you’ll get this running without any low-memory config, but you should be able to find the right combination (if it exists at all) through experimentation.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [September 25, 2025, 7:43pm UTC](https://community.fly.io/t/clickhouse-deployment-with-additional-configs/25955/8 "2025-09-25T19:43:48Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
