Prevent session timeout during database update

后端 未结 2 1404
囚心锁ツ
囚心锁ツ 2021-02-20 16:06

Background

A web application calls a stored procedure to perform an intensive database update. The relevant portion of web.xml was updated to four hours:<

2条回答
  •  悲哀的现实
    2021-02-20 16:37

    By reading the abvoe , i can ensure you have two options even though second one is difficult, its the best proces

    1) Page Refresh

    1. Spawn the database update process as a background task.
    2. Have a Servlet continually refresh the page to check for completion.

    2) Optimization

    Optimizing the query to finish in under 30 minutes (the maximum permitted timeout) is possible, but it is likely the query cannot be optimized sufficiently.

提交回复
热议问题