Home > front end >  clickhouse client does not work (or server)
clickhouse client does not work (or server)

Time:05-11

I am using VPS with Ubuntu 20.04 and getting error after entering clickhouse-client: Connecting to localhost:9000 as user default. Code: 210. DB::NetException: Connection refused (localhost:9000). (NETWORK_ERROR)

Just installed clickhouse so config file was not modified. Checked also lines like <listen_host>::</listen_host>, they are all commented. Tried to uncomment line with ::, didn't help, commented back.

Entered tail -64 /var/log/clickhouse-server/clickhouse-server.err.log

[ 23041 ] {} Application: Child process was terminated by signal 9 (KILL). If it is not done by 'forcestop' command or manually, the possible cause is OOM Killer (see 'dmesg' and look at the '/var/log/kern.log' for the details).

dmesg

Out of memory: Killed process 23960 (clickhouse-serv) total-vm:1451144kB, anon-rss:44780kB, file-rss:282976kB, shmem-rss:0kB, UID:998 pgtables:1188kB oom_score_adj:0

So tried to increase ratio from 0.9 by default up to 8, didn't help <max_server_memory_usage_to_ram_ratio>2</max_server_memory_usage_to_ram_ratio>

And finally it seems like 512mb of RAM on vps is extremely low for clickhouse, however is there any way at least to start client and test small database?

CodePudding user response:

https://clickhouse.com/docs/en/operations/tips#ram

You need to have 4GB SWAP.

You need to change <mlock_executable>true</mlock_executable> to false in config.xml

  • Related