mathcoll/t6

Server return errors on authentification, on POST datapoints, and on getting datapoints to display on dahsboard

mathcoll opened this issue · 2 comments

Describe the bug
Server return errors on authentification, on POST datapoints, and on getting datapoints to display on dahsboard

503 ServiceUnavailableError -> ServerError [ServiceUnavailableError]: Response timeout

To Reproduce
Steps to reproduce the behavior:

  1. Keep the server going for multiple weeks/months
  2. some Api call might fails and return either a 40x or a 429 due to latency on gathering items from influxDb
  3. As a result the server returns error because the header has already been sent

Assumption
retention4w.requestest is full of "anonymous" logs
thos anonymous data are not usefull for the monthly report but can be used on security check for multiple auth attemps

Option
Set a short retention policy on anonymous Api calls so that the other non-anonymous data will be available for monthlyreport
Use that short retention on checkForTooManyFailure() function
/!\ Stop the mess on events + requests

Fix done and require a lot of test.
Currently in testing phase.

No more issue