Page 1 of 1
How to increase DB 68/151
Posted: Tue Aug 18, 2020 8:26 am
by toan6110
My zoneminder server show DB:68/151
And I'm recording 31 IP Cameras on this server.
I need increase the DB to 68/512 to record 64 IP Cameras. Anybody can instruction me, please?
Re: How to increase DB 68/151
Posted: Wed Aug 19, 2020 10:46 am
by Maximo1970
You need to make a few changes to the MySQL config. Depending on your OS, you need to edit my.cnf, for me this was located in /etc/my.cnf. Here's mine, I have 9 cameras running with two streams each. Also get hold of "mysqltuner.pl" and run that against your server to see what other configuration changes are suggested.
Code: Select all
innodb_log_file_size = 128M
innodb_buffer_pool_size = 1024M
innodb_buffer_pool_instances = 1
innodb_file_per_table = 1
innodb_doublewrite = OFF
innodb_additional_mem_pool_size = 80M
innodb_flush_log_at_timeout = 3
innodb_flush_log_at_timeout = 3
innodb_read_io_threads = 32
innodb_write_io_threads = 16
join_buffer_size = 128M
tmp_table_size = 128M
max_allowed_packet = 33554432
max_heap_table_size = 128M
max_connections = 250 <<<<<<<<< This the setting you need to work on. ########
innodb_flush_log_at_trx_commit = 0
innodb_log_buffer_size = 16M
innodb_log_file_size = 64M
innodb_lock_wait_timeout = 120
query_cache_type = 0
query_cache_size = 0
query_cache_limit = 2M
Re: How to increase DB 68/151
Posted: Wed Aug 19, 2020 11:28 am
by gruiarew
What exactly that numbers mean? I have DB:22/151 but I never knew what actually means...
Re: How to increase DB 68/151
Posted: Wed Aug 19, 2020 11:56 am
by Maximo1970
The first number is the current connections you have in place to the database and the second number if the maximum available connections.
Re: How to increase DB 68/151
Posted: Wed Aug 26, 2020 2:30 am
by toan6110
Thank you, Maximo1970. That's exactly what I need. I used Ubuntu 20.04 LTS, and the MySQL config file is /etc/mysql/my.cnf. I adjust the max_connections up to 512, and it work fine.
Re: How to increase DB 68/151
Posted: Tue Sep 22, 2020 11:43 pm
by rknobbe
I have 9 cameras and saw my DB connections grow to 300. I've since increased to 512. Is there a rule of thumb to determine how many connections are needed?