Koozali.org: home of the SME Server
Contribs.org Forums => Koozali SME Server 10.x => Topic started by: beast on August 15, 2021, 08:31:54 AM
-
Hi All
If I execute:
SHOW VARIABLES LIKE 'max_allowed_packet';
I get the value 4194304 (in phpmyadmin)
I I try to edit /etc/e-smith/templates/etc/my.cnf/011max-allowed-packet
to a higher value (default 16M) and then execute:
expand-template /etc/my.cnf
systemctl restart mariadb.service
Have also tried to reboot.
The value stay the same - why?
/Benny
-
I'm not sure why this occurs, but after all these years you should know not to edit default templates and use custom-templates instead.
Examples are in the wiki.
https://wiki.koozali.org/MySQL
Other people will read this, try to copy it and then wonder why things break.
Also read this to fully understand what you are doing and why it might not be working as you expect.
https://dba.stackexchange.com/questions/45087/max-allowed-packet-in-mysql
-
I think you need to be looking in # /etc/e-smith/templates/etc/my.cnf014server_system_variables
and perhaps adding a property and value to
# config show mariadb
mariadb=service
LocalNetworkingOnly=no
status=enabled
# config setprop mariadb MaxAllowedPacket 8M
# config show mariadb
mariadb=service
LocalNetworkingOnly=yes
MaxAllowedPacket=8M
status=enabled
MariaDB [(none)]> SHOW VARIABLES LIKE 'max_allowed_packet';
+--------------------+---------+
| Variable_name | Value |
+--------------------+---------+
| max_allowed_packet | 8388608 |
+--------------------+---------+
1 row in set (0.00 sec)
Will need to expnad templates etc, I did a reconfig and reboot to make sure..
-
there is a bug there, you need to open a bug against sme 10.0 for e-smith-mysql package
the variable is defined in 2 fragments
# grep max_allowed_packet /etc/e-smith/templates/etc/my.cnf/ -r
/etc/e-smith/templates/etc/my.cnf/011max_allowed_packet:max_allowed_packet=16M
/etc/e-smith/templates/etc/my.cnf/014server_system_variables: $OUT .= "max_allowed_packet=$var\n" if defined $var;
also
SHOW VARIABLES LIKE 'max_allowed_packet';
I get the value 4194304 (in phpmyadmin)
well this seems that mariadb is ignoring the setting you see in my.conf or something has changed it at runtime... you need to read mariadb manual or inspect what software might have changed it
https://mariadb.com/kb/en/server-system-variables/#max_allowed_packet
and
I I try to edit /etc/e-smith/templates/etc/my.cnf/011max-allowed-packet
do not edit templates, use templates customs...
you make it harder for you to know what you did on your server leaving it in an unknown state, and if you are happy with you change you leave yourself ignoring when this change will be overwritten by update...
-
Hi All
Thank you for the suggestions - I will look into it.
I know that I shall make custom templates. I am just trying to find out why I am unable to change the setting.
/Benny
-
because that template fragment you are trying to set using a custom template is being overridden by the fragment I listed, 014server_system_variables, it sets a number of my.cnf settings for mariadb settings..
Added: have a look at the my.cnf file, there are two entries for max_allowed_packet=
The last sets it, this is one created by the temp fragment 014server_system_variables
-
Should be fixed but needs testing/verifying please.
https://bugs.koozali.org/show_bug.cgi?id=11672