[Case 111717] mycnf can't be toggled in Tweak Settings

dezagus

Active Member
Mar 2, 2014
28
0
1
cPanel Access Level
Root Administrator
Someone can explain in brief what this strange (to me) e-mail means?

Important: Any update of cPanel & WHM forces the validation of the cpanel.config file. If you upgraded from cPanel & WHM version 11.40 or earlier, you should expect to receive this notification when you upgrade.

One or more key settings for “miserver” were either not found in cPanel & WHM’s server configuration file (.../cpanel/cpanel.config), or were present but did not pass validation. The file has updated with the following values:

The following settings were absent or invalid. Your server has copied the defaults for them from the configuration defaults file (....cpanel/etc/cpanel.config).
mycnf_auto_adjust_innodb_buffer_pool_size = 1

If you wish to change these settings, you can update most of these settings in WHM’s Tweak Settings interface, or you can manually alter the /var/cpanel/cpanel.config file. Read the cpanel.config file documentation (http://go.cpanel.net/cpconfig) for important information about this file.

Upgrades, updates, and other factors may cause you to receive this notification often. If you wish to opt out of this notification, update the cPanel Configuration Checks setting in WHM’s Contact Manager interface.
What mycnf_auto_adjust_innodb_buffer_pool_size = 1 do?

Thank you :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello :)

The "mycnf_auto_adjust_innodb_buffer_pool_size" value is for the following option in "Tweak Settings:

"Let cPanel determine the best value for your MySQL innodb_buffer_pool_size configuration"

Internal case number 111717 is open to address an issue where this option can not be toggled in "Tweak Settings". You can monitor our change log to see when a resolution has been released:

11.44 Change Log

Thank you.
 

getUP

Registered
Jan 4, 2012
2
0
51
cPanel Access Level
DataCenter Provider
Could you please explain why this was chosen as the default? It should be set to 0 instead. Is there any security that it isn't set too high for example? What if it makes your total memory allocation for MySQL grow beyond 100% of your server? Does it protect you against OOM?

This is a really bad idea.
 

matt.kelch

Registered
Aug 14, 2014
1
0
1
cPanel Access Level
DataCenter Provider
I'm going to second @getUp here -- this is not something that is okay to have enabled by default.

First, you provided no warning that this change was coming. You've also not provided any documentation on how it will work. The fact that this is enabled by default is completely insane.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
The new setting will cause innodb_buffer_pool_size to be updated if the current setting doesn’t match what cPanel & WHM thinks it should be. We are changing its behavior in the following ways:

1. mycnf_auto_adjust_innodb_buffer_pool_size will be disabled by default (case 111909)
2. If innodb_buffer_pool_size is already defined in /etc/my.cnf, don’t change it (case pending)
3. If innodb is disabled, don't take action even if the user enabled the setting (case 111861)

We hope to have a build, with the changes, available today.

Right now I would recommend doing this on systems:

1. Edit /var/cpanel/cpanel.config
2. Add mycnf_auto_adjust_innodb_buffer_pool_size=0 OR modify the existing mycnf_auto_adjust_innodb_buffer_pool_size to be 0

Note: you can use /scripts/auto-adjust-mysql-limits --debug --verbose to test my recommended changes. You should see output like the following:
Code:
$ ./scripts/auto-adjust-mysql-limits --verbose --debug
info [auto-adjust-mysql-limits] Disabled by tweak setting 'mycnf_auto_adjust_innodb_buffer_pool_size'
info [auto-adjust-mysql-limits] max_allowed_packet current value: 268435456
info [auto-adjust-mysql-limits] max_allowed_packet update  value: 268435456
info [auto-adjust-mysql-limits] Disabled by tweak setting 'mycnf_auto_adjust_openfiles_limit'
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Remember after edit to run:
Code:
/usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings
This is not recommended. Running this command can actually result in unintended consequences because it will forcefully enable certain options. You can simply restart cpsrvd after making the suggested modification:

Code:
/scripts/restartsrv_cpsrvd
Thank you.
 

kernow

Well-Known Member
Jul 23, 2004
996
42
178
cPanel Access Level
Root Administrator
Not recommended?? How so? I quote from the top of that file cpanel.config:
Code:
#### NOTICE ####
# After manually editing any configuration settings in this file,
# please run '/usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings'
# to fully update your server's configuration.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Not recommended?? How so?
It's generally a better idea to make changes through the UI or with an API call whenever possible. When you do make direct edits to the cpanel.config file, it's better to simply run "/scripts/restartsrv_cpsrvd" after saving the changes. The notice you referenced in your previous reply should be disregarded for the time being, until the file is updated to remove that notice, or until changes are made that make running that command safe.

Thank you.
 

kernow

Well-Known Member
Jul 23, 2004
996
42
178
cPanel Access Level
Root Administrator
The notice you referenced in your previous reply should be disregarded for the time being, until the file is updated to remove that notice, or until changes are made that make running that command safe.

Thank you.
Pity that wasn't mentioned befor eh? Never mind though, we haven't encountered any problems yet.
 

Kobor

Member
Apr 5, 2012
6
1
53
cPanel Access Level
Root Administrator
I'm utterly disappointed by that update.
Not only that you have enabled by default mycnf_auto_adjust_innodb_buffer_pool_size, you also enabled mycnf_auto_adjust_maxallowedpacket and mycnf_auto_adjust_openfiles_limit .
Up to now cPanel wasn't sticking his nose in /etc/my.cnf and we liked that way (at least i did ).
Then suddenly you start messing with my.cnf .

And that wasn't the only change, i had slow log configured on all my servers, and now as i see was removed from ALL (up to now checked 5 servers and missing on all. and clearly was done by update) ? WTF ?
What will be next? You stop the master-slave replication because you think its better for me?
Or maybe disable MyISAM/InnoDB because in your opinion i'm better without it.
Maybe you already did just have to check the other servers.

So as i said very disappointed, to bad you don't have any real alternative.
Guess have to start chattr +i some files, until you don't start to chattr -i them. damn.