Zabbix_server do not start (even after rebooting the machine)

NethServer Version: 7.9
Module: Zabbix

since few days, my zabbix-server decided to… take a nap.
After bashing some Windows Mobile devices, i took a coffee trying to understand what the funk was going on.

I were able to login to the interface, but the process was not started, as stated by the dashboard.

systemctl start zabbix-server did not ignite the whole gears, rebooting the system did not change a thing. So… runt through the log.
systemd is not capable to find the pid to babysit, therefore a tail /var/log/zabbix/zabbix_server.log led me to the issue…

[file:dbconfig.c,line:96] __zbx_mem_realloc(): please increase CacheSize configuration parameter

My solution is “stupid” and working, but i would like to summon @mrmarkuz which is the maintainer of the package and @Andy_Wismer as the resident Zabbix-guru of the forum.

cp /etc/zabbix/zabbix_server.conf /etc/zabbix/zabbix_server_bck.conf
for create a copy of the config file, than i changed the section of /etc/zabbix/zabbix_server.conf

### Option: CacheSize
#       Size of configuration cache, in bytes.
#       Shared memory size for storing host, item and trigger data.
#
# Mandatory: no
# Range: 128K-8G
# Default:
# CacheSize=8M

adding

CacheSize=128M

at the bottom

Questions are:

  • @mrmarkuz the change to the config file I suppose won’t survive to any signal-event related to zabbix_server, correct?

  • @Andy_Wismer for what i can understand, there was no defined cache size for the system. 128 is quite arbitrary and 16 times the default size. The installation is a VM with 4gb of ram hosting guacamole (still not used), zabbix and backup of the system… swap seem not used. I’m open for suggestions about a “reasonable” cache size, hint that could be helpful for other zabbix wannabe-admins better than me.

1 Like

@pike

The max value is only 8 GB RAM! :slight_smile:

In your case, I’d try with 4 GB RAM…

I so have never needed to define this on any of the over 30 Zabbix i maintain… (That’s why I’m wondering).
I will check and report, but need to go out quickly…

At home my Zabbix database is huge 12-16 GB… At my clients it’s usually 4-10 GB, depending on size of LAN, devices. Mine is large due to testing a lot!

My 2 cents
Andy

Correct. You need a custom template for persistance.

Create custom template dir:

mkdir -p /etc/e-smith/templates-custom/etc/zabbix/zabbix_server.conf

Create /etc/e-smith/templates-custom/etc/zabbix/zabbix_server.conf/90custom with following content:

# 90custom - additional settings
CacheSize=128M

Apply config:

signal-event nethserver-zabbix-update

2 Likes

@pike

Hi

I can confirm that I haven’t set this on any NethServer / Zabbix…

My NethServers usually run with 8 GB, some have 12, some even 16 GB RAM.
A friend has one at home with 6 GB RAM.

This may help, i usually implement this after setting Zabbix up:

https://pgtune.leopard.in.ua/#/

My 2 cents
Andy

This is related to PostGRE SQL and not to Zabbix. Anyway…
Currently the system have this version of PostGRE SQL

postgresql-9.2.24-7.el7_9.x86_64

PGTune do not refer to 9,2 but only to 9.5. I inserted the data related to my installation, which is a VM and not bare metal. This the output provided.

# DB Version: 9.5
# OS Type: linux
# DB Type: web
# Total Memory (RAM): 4 GB
# CPUs num: 2
# Data Storage: hdd

max_connections = 200
shared_buffers = 1GB
effective_cache_size = 3GB
maintenance_work_mem = 256MB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 4
effective_io_concurrency = 2
work_mem = 5242kB
min_wal_size = 1GB
max_wal_size = 4GB
max_worker_processes = 2

Going full cache (4GB) seem an overkill to me, i was asking myself if 128M should not be a bit too much aggressive…

@pike

Hi Michael

Sry, was on Anydesk with someone from the Forum - also Proxmox and Neth related… :slight_smile:

PG-Tune:
9.2 was available, but’s it’s officailly EOL…
9.5 valuse work.

Zabbix Cache:
128 MB should be enough, on all my servers (30+) it’s not been set, but I will also set this tonight / tomorrow…

My 2 cents
Andy