-
Problem report
-
Resolution: Cannot Reproduce
-
Major
-
5.0.13
-
Sprint 80 (Sep 2021), Sprint 81 (Oct 2021), Sprint 82 (Nov 2021), Sprint 83 (Dec 2021), Sprint 84 (Jan 2022), Sprint 85 (Feb 2022), Sprint 86 (Mar 2022), Sprint 87 (Apr 2022), Sprint 88 (May 2022), Sprint 89 (Jun 2022), Sprint 90 (Jul 2022), Sprint 91 (Aug 2022), Sprint 92 (Sep 2022), Sprint 93 (Oct 2022)
-
0.5
Steps to reproduce:
- Run 4 or more concurrent Zabbix clients (same user id/ password) from different forked processes
- When one of them finishes before the other, session is invalidated on server side and causes an exception on the other clients
To get a new session:
def get_zabbix_api(self): """ Get a Zabbix session :return: ZabbixAPI instance """ return ZabbixAPI(url=self.url, user=self.user, password=self.password)
To close the session:
if zapi is not None:
zapi.user.logout()
Result:
pyzabbix.api.ZabbixAPIException: {'code': -32500, 'message': 'Application error.', 'data': 'SQL statement execution has failed "DELETE FROM sessions WHERE status=\'1\' AND userid=\'71\'"', 'json': "{'jsonrpc': '2.0', 'method': 'user.logout', 'params': {}, 'id': '1', 'auth': '********'}"}
Expected:
Each session should stay alive regardless if other sessions are active. To be clear, this is not a multi threaded application but 4 or more different scripts running different get_history methods.