DOS Alert in 5.3

Sanjay Shah2 years ago

WARN: DOS ALERT: Request delayed=100ms --- What is this

How to get rid of the same.

Anton Tananaev2 years ago

Looks like API request throttling.

https://www.traccar.org/blog/traccar-5-2/

Sanjay Shah2 years ago

What to do to allow throttling ?

Also many times I am getting service unavailable error while accessing permissions api.

{
    "servlet": "org.glassfish.jersey.servlet.ServletContainer-31228d83",
    "message": "Service Unavailable",
    "url": "/api/permissions",
    "status": "503"
}
Anton Tananaev2 years ago

You can use web.maxRequestsPerSec to increase the API rate limit.

Sanjay Shah2 years ago

Appreciate quick revert. What is the min and max value allowed for this ?

Also will this solve below error as well :

{
    "servlet": "org.glassfish.jersey.servlet.ServletContainer-31228d83",
    "message": "Service Unavailable",
    "url": "/api/permissions",
    "status": "503"
}
Anton Tananaev2 years ago

Have you tried?

Sanjay Shah2 years ago

No. Actually, I unloaded 5.3 and back to old version. So before trying again wanted to make sure things. As your timezone may vary and i have to again undo the changes

Sanjay Shah2 years ago

Put web.maxRequestsPerSec -- as 99999

Then also still the service is getting unavailable. In postman getting below error while no log entries are found in the server.

{
    "servlet": "org.glassfish.jersey.servlet.ServletContainer-28bf82d9",
    "message": "Service Unavailable",
    "url": "/api/permissions",
    "status": "503"
}
Gps man2 years ago

Is this solved ?

Sanjay Shah2 years ago

@Anton can you please guide what more checks I can do. This situation is stopping the upgrade and further test of 5.3. Why is the service becoming unavailable ? Also no error entries are found during this challenge.
web.maxRequestsPerSec is also added in default.xml & tried in traccar.xml also with 99999 value.

Anton Tananaev2 years ago

Try removing the DoS servlet to see if it's related.

Sanjay Shah2 years ago

Thanks for the revert. How to remove DoS Servlet ?

Anton Tananaev2 years ago

Remove or comment it out in the code.

Sanjay Shah2 years ago

Oh. I am not a coder. Any other way out to do this ?

Anton Tananaev2 years ago

Not really.