You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The manage.py script is writing an invalid value to the config file when it starts up. According to the documentation for the innodb_buffer_pool_size, the number is in bytes. The script is writing MB (it divides the memory size KB by 1024 to get to MB).
On a 4GB memory server, it is writing 2867 which is below the minimum of 5242880. The default value for this field is 128MB (134217728).
Examining the docker log shows that the size is the minimum value
# replace innodb_buffer_pool_size value from environment
# or use a sensible default (70% of available physical memory)
innodb_buffer_pool_size = int(get_environ('INNODB_BUFFER_POOL_SIZE', 0))
if not innodb_buffer_pool_size:
with open('/proc/meminfo', 'r') as memInfoFile:
memInfo = memInfoFile.read()
base = re.search(r'^MemTotal: *(\d+)', memInfo).group(1)
innodb_buffer_pool_size = int((int(base) / 1024) * 0.7)
# replace server-id with ID derived from hostname
# ref https://dev.mysql.com/doc/refman/5.7/en/replication-configuration.html
hostname = socket.gethostname()
server_id = int(str(hostname)[:4], 16)
with open('/etc/my.cnf.tmpl', 'r') as f:
template = string.Template(f.read())
rendered = template.substitute(buffer=innodb_buffer_pool_size,
server_id=server_id,
hostname=hostname)
The text was updated successfully, but these errors were encountered:
Something is odd with the issue system at the moment it appears... I created a 'duplicate' issue for this one as it was showing a 404 error when created initially.
Something is odd with the issue system at the moment it appears... I created a 'duplicate' issue for this one as it was showing a 404 error when created initially.
No worries, closed the dupe.
An alternative would be to change the my.cnf.tmpl file to specify the substitution like so to include the units: innodb_buffer_pool_size = ${buffer}M
That seems like a good approach. Want to make a PR?
The manage.py script is writing an invalid value to the config file when it starts up. According to the documentation for the innodb_buffer_pool_size, the number is in bytes. The script is writing MB (it divides the memory size KB by 1024 to get to MB).
On a 4GB memory server, it is writing 2867 which is below the minimum of 5242880. The default value for this field is 128MB (134217728).
Examining the docker log shows that the size is the minimum value
2016-05-23 15:59:05 39336 [Note] InnoDB: Initializing buffer pool, size = 5M
An alternative would be to change the my.cnf.tmpl file to specify the substitution like so to include the units:
innodb_buffer_pool_size = ${buffer}M
https://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_buffer_pool_size
from manage.py:
The text was updated successfully, but these errors were encountered: