Howto Fix Error: Too many connections on Znuny, OTRS, OTOBO

You are regularly facing an the following error on your Znuny, OTRS or OTOBO installation?

Backend ERROR: OTRS-CGI-10 Perl: 5.30.0 OS: linux Time: Fri May 12 12:09:32 2022

 Message: Too many connections

 RemoteAddress: <your address>
 RequestURI: /otrs/

 Traceback (70706): 
   Module: Kernel::System::Web::InterfaceAgent::Run Line: 185
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 39
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

This is a typical case, there power users are having many tabs open, or open massively many tabs with tickets. Each tab is causing a connection to a database, since the connection sharing is somehow not optimally solved on the Tickets systems. To identify if we are facing this issue you have to login to your Znuny Server via SSH.

For mySQL or MariaDB run:

sudo su -

you are now usually connected as superuser to your database. If not run:

mysql -u <yourAdminUsernameOfDatabase>

Here we first want to know how many connections are currently active, this can be shown with:

show status where variable_name = 'Threads_connected';

And to see what our configured limit is:

show global variables like 'max_connections';

If you get this error once again simply execute this both commands to see if max_connections is nearby Threads_connected. If so you are probably having an issue to increase the concurrent connection count in your mysql/mariaDB database.

Increase connection count of your database

Under debian and Ubuntu you have the folder /etc/mysql/. Check if you have already a configuration set for it with

cd /etc/mysql
grep -r max_connections .

Usually this setting is only under mariadb.conf.d in the file 50-server.cnf.

vi /etc/mysql/mariadb.conf.d/50-server.cnf

Change here the configuration to e.g. 200 connections:

max_connections = 200;

If no configuration is set, usually the value is by default set to 150.

Do you need help with Znuny / OTRS?
We have lot of experiences with OTRS and Znuny and can help you with your issues. Get in touch with us and we will check if and how we can help you.

Leave a Comment

Do you need help with Znuny / OTRS?​

We have lot of experiences with OTRS and Znuny.
We can help you with your issues to solve them.

From giving you support up to implementing integrations to your existing systems.

Get in touch with us and we will check if and how we can help you.​