You can see many options as answer for your question, however you can use "-1" where the session never expires. Since you do not know how much time it will take for the thread to complete. E.g.:
<session-config>
<session-timeout>-1</session-timeout>
</session-config>
Or if you don't want a timeout happening for some purpose:
<session-config>
<session-timeout>0</session-timeout>
</session-config>
Another option could be increase the number to 1000, etc, etc, bla, bla, bla.
But if you really want to stop and you consider that is unnecessary for your application to force the user to logout, just add a logout button and the user will decide when to leave.
Here is what you can do to solve the problem if you do not need to force to logout, and in you are loading files that could take time base on server and your computer speed and the size of the file.
<!-- sets the default session timeout to 60 minutes. -->
<!-- <session-config>
<session-timeout>60</session-timeout>
</session-config> -->
Just comment it or deleted that's it! Tan tararantan, tan tan!