How to increase DB 68/151

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
toan6110
Posts: 4
Joined: Tue Aug 18, 2020 8:21 am

How to increase DB 68/151

Post 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?
Maximo1970
Posts: 97
Joined: Sun May 28, 2017 4:29 pm

Re: How to increase DB 68/151

Post 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
gruiarew
Posts: 30
Joined: Tue May 05, 2020 7:10 am

Re: How to increase DB 68/151

Post by gruiarew »

What exactly that numbers mean? I have DB:22/151 but I never knew what actually means...
Maximo1970
Posts: 97
Joined: Sun May 28, 2017 4:29 pm

Re: How to increase DB 68/151

Post 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.
toan6110
Posts: 4
Joined: Tue Aug 18, 2020 8:21 am

Re: How to increase DB 68/151

Post 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.
rknobbe
Posts: 8
Joined: Fri Jul 16, 2004 4:13 pm

Re: How to increase DB 68/151

Post 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?
Post Reply