Bug 37097

Summary: koha is not responding due to lack of free disk space (zebra tmp suddenly grows)
Product: Koha Reporter: Yuriy Kotsyuk <yuriy.kotsyuk>
Component: Searching - ZebraAssignee: Bugs List <koha-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: critical    
Priority: P5 - low CC: dcook, m.de.rooy, martin.renvoize
Version: 23.05   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Yuriy Kotsyuk 2024-06-16 09:33:28 UTC
Periodically we have a problem with free space on our koha server on Ubuntu 20.04.6. The total disk capacity is 210 GB (koha usually takes 105 GB), but sometimes the number of files in /var/lib/koha/library/biblios/tmp suddenly grows and takes up all the free disk space. As a result, koha server starts working with errors and stops completely.
I have come to the conclusion that this folder holds temporary zebra files. I just clear the tmp folder each time. After that, the koha wakes up.
Is that an issue with a small disk, or is that an issue with periodical cleaning tmp folder?
Comment 1 David Cook 2024-06-16 23:34:27 UTC
I have noticed on some systems that Zebra sometimes leaves behind temporary search results in that /var/lib/koha/library/biblios/tmp folder. I'd say on 98% of my instances it does not do this, but the other 2% it does. For those, I have a cronjob that uses the "find" command to find search result files older than say 1 hour and delete them. 

It's not clear why this happens and Zebra isn't really supported by its authors anymore. They suggest moving to Elasticsearch, which is also an option with Koha. 

I've found the cronjob workaround works well enough.
Comment 2 Katrin Fischer 2024-06-17 08:14:39 UTC
It sounds like his would also be a good one to discuss in chat/on mattermost (see chat.koha-community.org). It sounds like something a lot of people might have run into and have solved on system administration level.
Comment 3 Yuriy Kotsyuk 2024-06-17 17:38:12 UTC
(In reply to David Cook from comment #1)
> I have noticed on some systems that Zebra sometimes leaves behind temporary
> search results in that /var/lib/koha/library/biblios/tmp folder. I'd say on
> 98% of my instances it does not do this, but the other 2% it does. For
> those, I have a cronjob that uses the "find" command to find search result
> files older than say 1 hour and delete them. 
> 
> It's not clear why this happens and Zebra isn't really supported by its
> authors anymore. They suggest moving to Elasticsearch, which is also an
> option with Koha. 
> 
> I've found the cronjob workaround works well enough.

So, thanks! I'll try to do the same.
Comment 4 Martin Renvoize (ashimema) 2024-08-01 08:02:59 UTC
Moved to chat support.