Hello there,

We recently upgraded from Wicket 7.8.0 to 9.4.0 . We are experiencing
intermittent pages that are being lost from the session.

I can reproduce in production but it takes time and is random. We have a
page where some files can be uploaded to another microservice from the
webpage via an API. We have an AbstractDefaultAjaxBehavior in the page
which gets called every 15 minutes to keep the session alive. This has
always worked well.

I can reproduce by uploading a very large file which can take say 4 hours,
during this time I do not touch the page, or open any other tabs. The only
interaction during this process is the AbstractDefaultAjaxBehavior being
called every 15 minutes to keep the session alive. We see that
intermittently the page cannot be found in the session and wicket
automatically recreates the page again. This coming  from the call to
the AbstractDefaultAjaxBehavior - we see in the HTTP response headers that
wicket adds 'ajax-location: /the-page-we-are-on' and the wicket ajax JS
does a redirect to recreate the page.

This kills the upload obviously as the page is refreshed.

What could be causing this and where can I look in the code to understand
when wicket decides to eject the page from the session? FYI we have
setMaxSizePerSession
set at 10MB.

When does wicket decide to return the ajax-location header?

It is possible this issue was happening in 7.8 but was not on our radar so
is unknown.

Many thanks
Wayne

Reply via email to