[Koha] Out of memory

Rubeno Fernández enseikou at gmail.com
Mon Mar 19 19:12:29 NZDT 2018


Hi all,

How much memory do you need to run Koha?
I run a database with about 22000 records on a virtual server on Digital Ocean 
with 1GB memory and very low usage, but the server is crashing very often.

With dmesg I find this kind of messages several times a day:

[Sun Mar 18 16:10:10 2018] addbiblio.pl invoked oom-killer: 
gfp_mask=0x24201ca, order=0, oom_score_adj=0
[Sun Mar 18 16:10:10 2018] addbiblio.pl cpuset=/ mems_allowed=0
And then MySQL crashes and restarts:
Sun Mar 18 16:10:10 2018] Out of memory: Kill process 6539 (mysqld) score 222 
or sacrifice child
[Sun Mar 18 16:10:10 2018] Killed process 6539 (mysqld) total-vm:1538124kB, 
anon-rss:224948kB, file-rss:0kB

>From /var/log/syslog:
Mar 18 16:10:11 biblioteko systemd[1]: mysql.service: Main process exited, 
code=killed, status=9/KILL
Mar 18 16:10:11 biblioteko systemd[1]: mysql.service: Unit entered failed 
state.
Mar 18 16:10:11 biblioteko systemd[1]: mysql.service: Failed with result 
'signal'.
Mar 18 16:10:11 biblioteko systemd[1]: mysql.service: Service hold-off time 
over, scheduling restart.
Mar 18 16:10:11 biblioteko systemd[1]: Stopped MySQL Community Server.
Mar 18 16:10:11 biblioteko systemd[1]: Starting MySQL Community Server...

Just yesterday the killed process was rebuild_zebra.p, which didn't restart, 
and Koha was retrieving no results for searches.

The strange thing is that Digital Ocean's own monitoring tool never reports 
such memory spikes: usage is usually high but never more than 80%. Maybe the 
spikes are too short? What would you recommend for a more fine-grained 
monitoring of memory?

Right now my memory is this:
root at biblioteko:~# free
              total        used        free      shared  buff/cache   
available
Mem:        1016056      555304      266328       14936      194424      
292164
Swap:             0           0           0

On file /etc/mysql/mysql.conf.d/mysqld.cnf the value of 
"innodb_buffer_pool_size" is 385M, if that's of any help.

Do I really need more physical memory on my server?


More information about the Koha mailing list