springboot session timeout setting in azure app service

shin.ou 1 Reputation point
2021-07-19T15:25:00.047+00:00

my spring boot project worked well with the following setting in the local env.

server.servlet.session.timeout: 180m

but when i released the jar to the azure as app service. session time-out became to a default time(1800s).
request.getSession().getMaxInactiveInterval() = 1800

where can i set the session time in azure, or wheather azure support the setting ?

some one who can give some advice? thanks.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,933 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2021-07-30T19:55:03.62+00:00

    Hi @shinou,

    I'm not sure if you're deploy via .jar or .war but according to this Stackoverflow post, session timeout setting may or may not be used and seems to work when Spring Boot uses an embedded Tomcat as the web container. If you're deploy your app as a WAR file, your setting will not be honored unless a web.xml file is created with a configuration.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.