API 503 Service Unavailable - Jetty Server Timeout

Sainath2 years ago

Hello,

I'm using the /permissions/bulk API endpoint and notice that if the request takes more than 30 seconds to process, at exactly 30 seconds duration, I'm receiving "503 - Service Unavailable" as a HTML response.

I'm suspecting that this is due to a timeout.

Is there any way I can increase this timeout?

Tested this on Development / Locally by using "Thread.sleep(35000);".

Tried setting idleTimeout to 60000 in WebServer.java file for Jetty server and ServletHolder but no luck.

Kindly help me out here.

Thanks!

Anton Tananaev2 years ago

What does the response look like exactly? I'm pretty sure we don't have any timeouts on the backend.

Sainath2 years ago

The response is as follows:

<!DOCTYPE><html><head><title>Error</title></head><html><body>503 - Service Unavailable</body></html>

I see that it is coming from servletHandler.setErrorHandler in WebServer.java.

The weird behaviour is that this error is getting triggered exactly at 30 seconds.

According to some StackOverflow answers, Jetty server's default idleTimeout value is 30 seconds.
However, I could not update this idleTimeout value.

Note: I solved this issue of mine by making minor edits in the code of /permissions/bulk API endpoint.
So, it is not an issue / priority anymore for me but the question I asked above remains unsolved. You can kindly ignore it.

Thanks for your swift reply.