HAProxy create new sessions in Tomcat

Hi,

I’am using HAProxy 1.5.18 on CentOS 7.3 and Tomcat 8.

HAProxy create a lot of sessions (more 350) on my Tomcat Server! Every 10 seconds, a new session is created. I think it is this line :

option httpchk OPTIONS /

How can I stop the creation of session on Tomcat ? It is a HAProxy configuration ? Or Tomcat configuration ?

Thank you,

Use the Tomcat Crawler Session Manager Valve. It uses the user-agent to avoid creating lots of sessions in exactly these situations.

It’s OK, in the access log, i’ve got a 302 code… so i change my option to /login.html (real page) and now I’ve got code 200 and the number of session don’t increase…