I have been studying a possible race condition occurring in the API when some API calls are made at the exact same time the API is rotating its log at midnight. When that happens, the API receives a SIGTERM and terminates.
We can see there are three different calls (GET /agents?limit=1, GET /cluster/status and GET /agents) scheduled by the Kibana cronjob every 15 minutes, and they are occurring at exact hours in this case (07:00, 07:15, 07:30, etc). They do not always occur at exact hours, it depends on first execution.
The API log rotation occurs exactly at 00:00 and will concur in this case with some of those calls.
We should further investigate the issue based on these premises.
Hello team,
I have been studying a possible race condition occurring in the API when some API calls are made at the exact same time the API is rotating its log at midnight. When that happens, the API receives a SIGTERM and terminates.
Based on these logs provided by one of our users:
We can see there are three different calls (
GET /agents?limit=1
,GET /cluster/status
andGET /agents
) scheduled by the Kibana cronjob every 15 minutes, and they are occurring at exact hours in this case (07:00, 07:15, 07:30, etc). They do not always occur at exact hours, it depends on first execution.The API log rotation occurs exactly at 00:00 and will concur in this case with some of those calls.
We should further investigate the issue based on these premises.
Best regards,
David J. Iglesias