I need some help:

My web application has an upload file function. These files can be huge.
While the file is uploading, the upload class spawns a new thread to send
status updates to the client's progress bar. This works fine even for the
most giant files except when we want to make a parallel deployment while
uploads are happening.

08-Jul-2016 10:41:41.852 WARNING
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The
web application [WebApps##001012] is still processing a request that has
yet to finish. This is very likely to create a memory leak. You can control
the time allowed for requests to finish by using the unloadDelay attribute
of the standard Context implementation. Stack trace of request processing
thread:
...

and the stack trace shows it is right in the middle of a file upload.

On top of that, the threads that update the upload progress bar are firing
and are being beat down by tomcat:

8-Jul-2016 10:41:42.233 INFO [http-nio-8080-exec-7]
org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading
Illegal access: this web application instance has been stopped already.
Could not load [META-INF/services/javax.xml.parsers.SAXParserFactory]. The
following stack trace is thrown for debugging purposes as well as to
attempt to terminate the thread which caused the illegal access.
 java.lang.IllegalStateException: Illegal access: this web application
instance has been stopped already. Could not load
[META-INF/services/javax.xml.parsers.SAXParserFactory]. The following stack
trace is thrown for debugging purposes as well as to attempt to terminate
the thread which caused the illegal access.
...

And that's one of the upload progress threads.

The first message mentions setting unloadDelay as a possible solution. The
docs are light on the consequences of setting that value abnormally high to
accommodate the largest of file uploads. What would setting it to an hour
(3600000 ms) or more do? Will the next version of the webapp deploy and run
for new sessions while the old one waits to idle out? What about those
threads? Will they be allowed to fire while it is waiting on shutdown?

I'm in the process of setting up a sandbox but if y'all have advice for me
that would save me the trouble of setting the scenario up on a set of test
servers, I would REALLY appreciate it.

Reply via email to