DOS Alert in 5.3

Sanjay Shah 3 years ago

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

How to get rid of the same.

Anton Tananaev 3 years ago

Looks like API request throttling.

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

Sanjay Shah 3 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 Tananaev 3 years ago

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

Sanjay Shah 3 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 Tananaev 3 years ago

Have you tried?

Sanjay Shah 3 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 Shah 3 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 man 3 years ago

Is this solved ?

Sanjay Shah 3 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 Tananaev 3 years ago

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

Sanjay Shah 3 years ago

Thanks for the revert. How to remove DoS Servlet ?

Anton Tananaev 3 years ago

Remove or comment it out in the code.

Sanjay Shah 3 years ago

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

Anton Tananaev 3 years ago

Not really.