OPNsense Forum

Archive => 19.7 Legacy Series => Topic started by: rainerle on October 16, 2019, 02:31:12 PM

Title: Zabbix proxy plugin: private shared memory - Cannot allocate memory
Post by: rainerle on October 16, 2019, 02:31:12 PM
Hi,

trying to migrate a dedicated Zabbix proxy to OPNsense. Startup fails with


cannot initialize database cache: cannot get private shared memory of size 536870912 for history index cache: [12] Cannot allocate memory


Zabbix Proxy Settings:

root@opnsense01:~ # cat /usr/local/etc/zabbix4/zabbix_proxy.conf
...
CacheSize=8M
HistoryCacheSize=64M
HistoryIndexCacheSize=512M
...


Above Proxy values are from the existing proxy...

What do I have to set specifically with sysctl ( /system_advanced_sysctl.php ) to get that proxy up?

Best regards
Rainer
Title: Re: Zabbix proxy plugin: private shared memory - Cannot allocate memory
Post by: mimugmail on October 16, 2019, 04:23:17 PM
How many new values per second do you have? 500 MB is quite huge for a proxy
Title: Re: Zabbix proxy plugin: private shared memory - Cannot allocate memory
Post by: rainerle on October 17, 2019, 07:33:53 AM
Good morning Michael,

no idea how this is related to my question  ;)


Number of hosts (enabled/disabled/templates) 828
Number of items (enabled/disabled/not supported) 206957
Number of triggers (enabled/disabled [problem/ok]) 34127
Number of users (online) 33
Required server performance, new values per second 1174.31


My next post will be how to set "ProxyOfflineBuffer" from 1 to 72 and if you could add "Include /usr/local/etc/zabbix4/zabbix_proxy.d/" to the generated zabbix_proxy.conf.

Best regards
Rainer

P.S.: Oh, and RAM is cheap these days:

...
Mem: 24M Active, 270M Inact, 2985M Wired, 12G Free
...
Title: Re: Zabbix proxy plugin: private shared memory - Cannot allocate memory
Post by: mimugmail on October 18, 2019, 10:50:14 AM
It was just unclear to me that you want to hold values over the weekend if there's a crash somewhere. Now it's clear :)