Skip to content

Commit 3b3a94c

Browse files
authored
Fixes #708 - Add 'max_connections' function for suggesting a value
1 parent 498ca56 commit 3b3a94c

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

appendix/configure-database-server.rst

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,34 @@ Keep in mind that versions may differ from your setup - adapt where needed.
3939
$ sudo -u postgres psql -c 'SHOW config_file'
4040
4141
Adjust ``max_connections`` (mandatory)
42-
Zammad will take up to 200 connections by default, with below command you can raise this limit fairly high.
42+
Zammad uses up to 200 connections by default. Depending on your setup
43+
and load, you may want to change this value.
4344

44-
Raise maximum allowed number of connections:
45+
Determine Value
46+
To help you determine a number, Zammad ships a function to calculate a
47+
suggestion. If executed, it asks you to input some integer values and
48+
additionally uses internally known values for the calculation. Be aware
49+
that the suggestion is instance specific. That means you must run the
50+
calculation on the system you want to adjust the ``max_connection`` value.
4551

46-
.. code-block:: console
52+
Run it by using the command:
4753

48-
$ sed -i "/max_connections/c\max_connections = 2000" <postgresql-configuration-file>
54+
.. code-block:: console
4955
50-
Apply changes by restarting postgresql and Zammad (in this order):
56+
$ rake zammad:db:max_connections
5157
52-
.. code-block:: console
58+
Adjust Value
59+
Raise the maximum allowed number of connections:
5360

54-
$ sudo systemctl restart postgresql zammad
61+
.. code-block:: console
62+
63+
$ sed -i "/max_connections/c\max_connections = 2000" <postgresql-configuration-file>
64+
65+
Apply changes by restarting postgresql and Zammad (in this order):
66+
67+
.. code-block:: console
68+
69+
$ sudo systemctl restart postgresql zammad
5570
5671
Adjust PostgreSQL for bigger instances (optional)
5772
.. warning::

0 commit comments

Comments
 (0)