[Koha] MySql errors

Coehoorn, Joel jcoehoorn at york.edu
Sat Dec 5 04:10:56 NZDT 2020


Adding more RAM to the VM will not automatically increase the MySql
numbers. You must also increase the configured buffer pool. Make sure to
set the *right* buffer pool: there should be separate options for the
innodb buffer pool from the normal buffer pool, and it's the innodb pool
that matters for these tables.

But again, the concern: something was using enough to prevent MySql from
allocating even 128M.

Joel Coehoorn
Director of Information Technology
York College of Nebraska


On Fri, Dec 4, 2020 at 9:07 AM Scott Owen <sowen at almaschools.net> wrote:

> They are all VM's.... so adding RAM is pretty trivial. They are all
> running with (sheepishly said) 2gig.
>
> Would simply doubling the amount of VM RAM automatically translate to more
> RAM being available for MySql, or would I need to allocate more RAM
> specifically in the my.cnf sql config file.....sorry for sounding like an
> idiot, but I haven't messed with MySql in ....a few years....
>
>
>
> On Thu, Dec 3, 2020 at 3:54 PM Coehoorn, Joel <jcoehoorn at york.edu> wrote:
>
>> The important part of that log is here:
>>
>> 201201 14:04:22 InnoDB: Fatal error: cannot allocate memory for the buffer
>> pool
>>
>>
>> This means there's not enough memory. But I also see this:
>>
>> 01201 14:04:22 InnoDB: Initializing buffer pool, size = 128.0M
>>
>>
>> 128MB is the default for MySql, but it's ridiculously small for most real
>> installations. In an ideal world, you'd add enough RAM and change the MySql
>> configuration for enough buffer pool memory to hold all the tables/indexes
>> in your Koha database plus some left over for working sets and temp tables
>> during active queries. My buffer pool is set to 3GB, and I'd really like
>> to get it higher. In the practical world, many of us can't afford to
>> dedicate that much RAM -- but it's very concerning if not even 128MB is
>> available. If it worked previously, maybe a RAM module has gone bad. If you
>> have a virtual server, make sure enough memory is available for this system.
>>
>> Joel Coehoorn
>> Director of Information Technology
>> York College of Nebraska
>>
>>
>> On Thu, Dec 3, 2020 at 12:31 PM Alvaro Cornejo <cornejo.alvaro at gmail.com>
>> wrote:
>>
>>> Hi Scott
>>>
>>> Log shows a lack of memory for InnoDB...
>>>
>>> 201201 14:04:22 InnoDB: Initializing buffer pool, size = 128.0M
>>> InnoDB: mmap(135987200 bytes) failed; errno 12
>>> 201201 14:04:22 InnoDB: Completed initialization of buffer pool
>>> 201201 14:04:22 InnoDB: Fatal error: cannot allocate memory for the
>>> buffer
>>> pool
>>>
>>> I'll recommend you to the mysqtunnig tool for advice on mysql setup
>>>
>>> Regards,
>>>
>>> Alvaro
>>>
>>>
>>> |----------------------------------------------------------------------------------------|
>>>  Stay safe / Cuídate/  Reste sécurisé
>>> *7* Switch off as you go / Apaga lo que no usas /  Débranchez au fur et à
>>> mesure.
>>>  *q *Recycle always / Recicla siempre / Recyclez toujours
>>>  P Print only if absolutely necessary / Imprime solo si es necesario /
>>> Imprimez seulement si nécessaire
>>>
>>>
>>> Le jeu. 3 déc. 2020 à 13:21, Scott Owen <sowen at almaschools.net> a écrit
>>> :
>>>
>>> > Nothing that jumps out at me ???
>>> >
>>> >
>>> > 201201 14:04:21 [Warning] Using unique option prefix myisam-recover
>>> > instead of myisam-recover-options is deprecated and will be removed in
>>> a
>>> > future release. Please use the full name instead.
>>> > 201201 14:04:21 [Note] Plugin 'FEDERATED' is disabled.
>>> > 201201 14:04:21 InnoDB: The InnoDB memory heap is disabled
>>> > 201201 14:04:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins
>>> > 201201 14:04:21 InnoDB: Compressed tables use zlib 1.2.8
>>> > 201201 14:04:21 InnoDB: Using Linux native AIO
>>> > 201201 14:04:22 InnoDB: Initializing buffer pool, size = 128.0M
>>> > InnoDB: mmap(135987200 bytes) failed; errno 12
>>> > 201201 14:04:22 InnoDB: Completed initialization of buffer pool
>>> > 201201 14:04:22 InnoDB: Fatal error: cannot allocate memory for the
>>> buffer
>>> > pool
>>> > 201201 14:04:22 [ERROR] Plugin 'InnoDB' init function returned error.
>>> > 201201 14:04:22 [ERROR] Plugin 'InnoDB' registration as a STORAGE
>>> ENGINE
>>> > failed.
>>> > 201201 14:04:23 [ERROR] Unknown/unsupported storage engine: InnoDB
>>> > 201201 14:04:23 [ERROR] Aborting
>>> >
>>> > 201201 14:04:23 [Note] /usr/sbin/mysqld: Shutdown complete
>>> >
>>> > 201202  4:42:38 [Warning] Using unique option prefix myisam-recover
>>> > instead of myisam-recover-options is deprecated and will be removed in
>>> a
>>> > future release. Please use the full name instead.
>>> > 201202  4:42:38 [Note] Plugin 'FEDERATED' is disabled.
>>> > 201202  4:42:38 InnoDB: The InnoDB memory heap is disabled
>>> > 201202  4:42:38 InnoDB: Mutexes and rw_locks use GCC atomic builtins
>>> > 201202  4:42:38 InnoDB: Compressed tables use zlib 1.2.8
>>> > 201202  4:42:38 InnoDB: Using Linux native AIO
>>> > 201202  4:42:38 InnoDB: Initializing buffer pool, size = 128.0M
>>> > 201202  4:42:38 InnoDB: Completed initialization of buffer pool
>>> > 201202  4:42:38 InnoDB: highest supported file format is Barracuda.
>>> > InnoDB: The log sequence number in ibdata files does not match
>>> > InnoDB: the log sequence number in the ib_logfiles!
>>> > 201202  4:42:38  InnoDB: Database was not shut down normally!
>>> > InnoDB: Starting crash recovery.
>>> > InnoDB: Reading tablespace information from the .ibd files...
>>> > InnoDB: Restoring possible half-written data pages from the doublewrite
>>> > InnoDB: buffer...
>>> > 201202  4:42:38  InnoDB: Waiting for the background threads to start
>>> > 201202  4:42:39 InnoDB: 5.5.62 started; log sequence number 2511323625
>>> > 201202  4:42:39 [Note] Server hostname (bind-address): '10.27.1.25';
>>> port:
>>> > 3306
>>> > 201202  4:42:39 [Note]   - '10.27.1.25' resolves to '10.27.1.25';
>>> > 201202  4:42:39 [Note] Server socket created on IP: '10.27.1.25'.
>>> > 201202  4:42:39 [Note] Event Scheduler: Loaded 0 events
>>> > 201202  4:42:51 [Note] /usr/sbin/mysqld: ready for connections.
>>> > Version: '5.5.62-0+deb8u1'  socket: '/var/run/mysqld/mysqld.sock'
>>> port:
>>> > 3306  (Debian)
>>> >
>>> > On Thu, Dec 3, 2020 at 12:01 PM Alvaro Cornejo <
>>> cornejo.alvaro at gmail.com>
>>> > wrote:
>>> >
>>> >> Hi Scott,
>>> >>
>>> >> Have you any error/warning on your mysql log that might give you a
>>> clue?
>>> >>
>>> >> Might it be that mysql runs out of allowed connections or memory?
>>> >>
>>> >> See this:
>>> >> https://tecadmin.net/check-update-max-connections-value-mysql
>>> >>
>>> >>
>>> https://www.percona.com/blog/2018/06/28/what-to-do-when-mysql-runs-out-of-memory-troubleshooting-guide/
>>> >>
>>> >> Also, you can check mysql config/performance with:
>>> >> https://github.com/major/MySQLTuner-perl
>>> >>
>>> >> In addition, you are not running memcached it will give an extra
>>> boost to
>>> >> your koha.
>>> >>
>>> >> Regards,
>>> >>
>>> >> Alvaro
>>> >>
>>> >>
>>> >>
>>> |----------------------------------------------------------------------------------------|
>>> >>  Stay safe / Cuídate/  Reste sécurisé
>>> >> *7* Switch off as you go / Apaga lo que no usas /  Débranchez au fur
>>> et
>>> >> à mesure.
>>> >>  *q *Recycle always / Recicla siempre / Recyclez toujours
>>> >>  P Print only if absolutely necessary / Imprime solo si es necesario /
>>> >> Imprimez seulement si nécessaire
>>> >>
>>> >>
>>> >> Le jeu. 3 déc. 2020 à 11:34, Scott Owen <sowen at almaschools.net> a
>>> écrit :
>>> >>
>>> >>> Hi All,
>>> >>>
>>> >>> I have been getting some random errors for the last couple of months
>>> on
>>> >>> all
>>> >>> of my Koha boxes:
>>> >>>
>>> >>> Software error:
>>> >>> DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed:
>>> Can't
>>> >>> connect to local MySQL server through socket
>>> >>> '/var/run/mysqld/mysqld.sock'
>>> >>> (2) at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1490. at
>>> >>> /usr/share/koha/lib/Koha/Database.pm line 102
>>> >>> For help, please send mail to the webmaster ([no address given]),
>>> giving
>>> >>> this error message and the time and date of the error.
>>> >>>
>>> >>>
>>> >>>
>>> >>> Current version information (at least for this one
>>> installation...other
>>> >>> versions may differ):
>>> >>>
>>> >>> Koha version: 17.11.18.000
>>> >>> OS version ('uname -a'): Linux Pine 3.16.0-4-686-pae #1 SMP Debian
>>> >>> 3.16.51-3 (2017-12-13) i686
>>> >>> Perl interpreter: /usr/bin/perl
>>> >>> Perl version: 5.020002
>>> >>> Perl @INC: /usr/share/koha/lib
>>> >>> /etc/perl
>>> >>> /usr/local/lib/i386-linux-gnu/perl/5.20.2
>>> >>> /usr/local/share/perl/5.20.2
>>> >>> /usr/lib/i386-linux-gnu/perl5/5.20
>>> >>> /usr/share/perl5
>>> >>> /usr/lib/i386-linux-gnu/perl/5.20
>>> >>> /usr/share/perl/5.20
>>> >>> /usr/local/lib/site_perl
>>> >>> .
>>> >>> MySQL version: mysql Ver 14.14 Distrib 5.5.62, for debian-linux-gnu
>>> >>> (i686)
>>> >>> using readline 6.3
>>> >>> Apache version: Server version: Apache/2.4.10 (Debian)
>>> >>> Memcached: Servers: undefined | Namespace: koha | Status: unknown |
>>> >>> Config
>>> >>> read from: Nowhere Note that the right place to define the memcached
>>> >>> config
>>> >>> is in your $KOHA_CONF file. Currently you do not have a valid
>>> memcached
>>> >>> configuration defined. | Effective caching method:
>>> >>> Zebra version: Zebra 2.0.59 (C) 1994-2014, Index Data Zebra is free
>>> >>> software, covered by the GNU General Public License, and you are
>>> welcome
>>> >>> to
>>> >>> change it and/or distribute copies of it under certain conditions.
>>> >>>
>>> >>> I've done some "googling" but couldn't find a definitive "fix" for
>>> this
>>> >>> issue....
>>> >>> Any idea where I should start on this ?? MySql config ??? Koha
>>> config ???
>>> >>> any ideas what I should be looking for ? Known issue ??
>>> >>> Thank you,
>>> >>>
>>> >>> -Scott
>>> >>> _______________________________________________
>>> >>>
>>> >>> Koha mailing list  http://koha-community.org
>>> >>> Koha at lists.katipo.co.nz
>>> >>> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>>> >>>
>>> >>
>>> _______________________________________________
>>>
>>> Koha mailing list  http://koha-community.org
>>> Koha at lists.katipo.co.nz
>>> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>>>
>>


More information about the Koha mailing list