My Tech-Notes

Common reasons for high Koha server load

1. Bots hitting OPAC

2. Heavy API usage

tail -f /var/log/koha/yourinstance/opac-access.log tail -f /var/log/koha/yourinstance/intranet-access.log

3. Plack misconfigured

4. Indexing jobs running too often


Solutions : Here’s what you can do safely:


Step 1: Tune Plack workers

Koha uses plack for faster Perl web serving. Too many or too few workers can cause high load or slow performance.

Check current workers:

cat /etc/koha/sites/yourinstance/koha-conf.xml | grep -i prefork

Example section:

<plack_max_requests>50</plack_max_requests>
<plack_workers>2</plack_workers>

Basic rule:


Step 2: Limit bots

Use:


Step 3: Optimize Zebra / Elasticsearch

If you use Zebra:

sudo koha-rebuild-zebra -v -f yourinstance

Step 4: Check cron jobs

Sometimes cron jobs hammer the server. Look:

crontab -l -u koha

See if koha-run-backups, koha-index-daemon, or cronjobs are too frequent.


Key tip

If you don’t need Koha’s REST API externally, block it in Apache or firewall.

Example Apache:

<Location /api>
   Require ip YOUR.INTERNAL.IP.RANGE
</Location>

Or block it completely with:

RedirectMatch 403 ^/api