Kopano search high CPU usage
-
Hello
Am having problem with kopano-search is using a lot of CPU. How can I troubleshot this? Because kopano-search is always in use, kopano-server and mysql is also using CPU all the time.When I try to stop kopano search, systemctl stop kopano-search, it always needs to be killed.
journalctl --since today -u kopano-search... sep 07 16:39:33 kopano systemd[1]: Stopping Kopano Groupware Core Search Daemon... sep 07 16:39:33 kopano kopano-search[5769]: 2021-09-07T16:39:33.326: [ERROR ] index0 - Traceback (most recent call last): sep 07 16:39:33 kopano kopano-search[5769]: File "/usr/lib/python3/dist-packages/MAPICore.py", line 662, in <lambda> sep 07 16:39:33 kopano kopano-search[5769]: __setattr__ = lambda self, name, value: _swig_setattr(self, IMAPIFolder, name, value) sep 07 16:39:33 kopano kopano-search[5769]: File "/usr/lib/python3/dist-packages/kopano/service.py", line 206, in <lambda> sep 07 16:39:33 kopano kopano-search[5769]: signal.signal(signal.SIGTERM, lambda *args: sys.exit(0)) sep 07 16:39:33 kopano kopano-search[5769]: SystemExit: 0 sep 07 16:39:33 kopano kopano-search[5769]: The above exception was the direct cause of the following exception: sep 07 16:39:33 kopano kopano-search[5769]: Traceback (most recent call last): sep 07 16:39:33 kopano kopano-search[5769]: File "/usr/lib/python3/dist-packages/kopano/log.py", line 140, in log_exc sep 07 16:39:33 kopano kopano-search[5769]: try: yield sep 07 16:39:33 kopano kopano-search[5769]: File "/usr/lib/python3/dist-packages/kopano_search/__init__.py", line 202, in main sep 07 16:39:33 kopano kopano-search[5769]: if not self.indexed_folder(config, store, folder): sep 07 16:39:33 kopano kopano-search[5769]: File "/usr/lib/python3/dist-packages/kopano_search/__init__.py", line 173, in indexed_folder sep 07 16:39:33 kopano kopano-search[5769]: path = folder.path sep 07 16:39:33 kopano kopano-search[5769]: File "/usr/lib/python3/dist-packages/kopano/folder.py", line 250, in path sep 07 16:39:33 kopano kopano-search[5769]: subtree_entryid = self.store.subtree.entryid sep 07 16:39:33 kopano kopano-search[5769]: File "/usr/lib/python3/dist-packages/kopano/store.py", line 242, in subtree sep 07 16:39:33 kopano kopano-search[5769]: return _folder.Folder(self, _benc(ipmsubtreeid)) sep 07 16:39:33 kopano kopano-search[5769]: File "/usr/lib/python3/dist-packages/kopano/folder.py", line 145, in __init__ sep 07 16:39:33 kopano kopano-search[5769]: self.mapiobj sep 07 16:39:33 kopano kopano-search[5769]: File "/usr/lib/python3/dist-packages/kopano/folder.py", line 157, in mapiobj sep 07 16:39:33 kopano kopano-search[5769]: self._mapiobj = self.store.mapiobj.OpenEntry(self._entryid, sep 07 16:39:33 kopano kopano-search[5769]: File "/usr/lib/python3/dist-packages/MAPICore.py", line 602, in OpenEntry sep 07 16:39:33 kopano kopano-search[5769]: return _MAPICore.IMsgStore_OpenEntry(self, cbEntryID, lpInterface, ulFlags) sep 07 16:39:33 kopano kopano-search[5769]: SystemError: <built-in function IMsgStore_OpenEntry> returned a result with an error set sep 07 16:41:03 kopano systemd[1]: kopano-search.service: State 'stop-sigterm' timed out. Killing. sep 07 16:41:03 kopano systemd[1]: kopano-search.service: Killing process 5769 (kopano-search) with signal SIGKILL. sep 07 16:41:03 kopano systemd[1]: kopano-search.service: Killing process 6043 (kopano-search) with signal SIGKILL. sep 07 16:41:03 kopano systemd[1]: kopano-search.service: Main process exited, code=killed, status=9/KILL sep 07 16:41:03 kopano systemd[1]: kopano-search.service: Failed with result 'timeout'.
/etc/kopano/search.cfg
grep log /etc/kopano/search.cfg log_method = file log_level = 6 log_file = /var/log/kopano/search.log log_timestamp = yes
/var/log/kopano/search.log
2021-09-07T16:42:57.104: [INFO ] search - starting search 2021-09-07T16:42:58.218: [INFO ] search - found previous server sync state: 02000000F87D0C00 2021-09-07T16:42:58.223: [INFO ] search - starting incremental sync 2021-09-07T16:42:58.224: [INFO ] query - listening on socket file:///var/run/kopano/search.sock 2021-09-07T16:42:58.596: [INFO ] index0 - syncing folder: "user1" "Deleted Items" 2021-09-07T16:42:58.598: [INFO ] index0 - found previous folder sync state: 3601000071BA0C00 2021-09-07T16:42:58.621: [INFO ] index0 - syncing folder: "user2" "Calendar" 2021-09-07T16:42:58.621: [INFO ] index0 - found previous folder sync state: 0801000075BA0C00
Version
WebApp: 6.0.0.57-1+2026.1
Kopano Core: 11.0.2
Z-Push: 2.6.4+0-0 -
@blinkiz Same here. My only workaround is restart kopano-search once a week.
-
closing here since there is already a topic at https://forum.kopano.io/topic/3810/upgrade-core-11-0-1-2-to-11-0-2-41-high-search-cpu-usage/