ptulula
ptulula

Reputation: 23

Intermittent 500 errors on spark-java site

I have a site built on spark-java (with nginx in front). Everything has been working fine, but recently, when under higher-than-usual load, users have been getting intermittent 500 errors. The server itself is not anywhere near capacity (CPU:13% and memory: 35%). So I'm not sure what is causing this. I have

Spark.exception(Exception.class, (exception, request, response) -> {
            exception.printStackTrace();
});

but not seeing exceptions when these 500s happen.

I see there's a internalServerError handler but that seems to be just for showing a custom page when this happens.

So, my question is how can I investigate this and find out the root cause of the 500s? Is there a hook I can attach to, that would be triggered when internal server errors occur to see what's causing them?

If not, what are some typical things that can cause this.

Upvotes: 0

Views: 39

Answers (0)

Related Questions