-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

To whom it may concern,

On 1/6/17 5:21 PM, modjkl...@comcast.net wrote:
> I'm porting a Apache Flex (with Apache BlazeDS) web app from 
> glassfish to tomcat 8.5.9, and observing the following severe
> error.
> 
> 06-Jan-2017 13:49:07.644 SEVERE 
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
> org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapFo
rLeaks
>
> 
The web application [myApp] created a ThreadLocal with key of type
> [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@4d6e6d7b])
> and a value of type [flex.messaging.io.SerializationContext]
> (value [flex.messaging.io.SerializationContext@66135428]) but
> failed to remove it when the web application was stopped. Threads
> are going to be renewed over time to try and avoid a probable
> memory leak.
> 
> Is this a warning or an actual error that is causing a memory
> leak?

This is probably a problem with the application that Glassfish never
detected, but has always been there.

This is a warning about a leak, but Tomcat will cycle-through the
request-processing threads, retiring them at intervals, in order to
mitigate the leak. You're welcome ;)

If all goes well, this leak will be handled by Tomcat and your service
won't suffer for it. That said, you should fix the problem because
cleaning-up messes is wasteful if the mess wasn't necessary in the
first place.

> Can anyone point me in the right direction to resolve this?

The leak itself is coming from your application or one of the
libraries it's using. The solution will be to find a fix that leak.

I would start by asking the Apache Flex people what the
SerializationContext is for, and how to remove ThreadLocal values from
shared threads (such as those in a servlet environment).

It's possible you are using the Flex framework in a way that is not
conducive to a servlet environment, but that a few changes could make
it safer to use.

> I'm a new Tomcat user (please try to be explicit).

Welcome to the community.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYcBxSAAoJEBzwKT+lPKRYmNsP/3w4GmqYvLoCS40bUEqmC0gp
placYbZkbloyRLxRRjgbod8qZcj5HPQqJzGfzV9vS4Wu5PdWg5rxbavv/aOOR/3X
X5hRtzRiw5TBDDUdxjp2MtxoANWRQ+XXITMFTy8dGqoq3LeAmJSsLpFri7T6GwNx
SO2ZeuwYPYX+r462tOlFqboS1FvZTcGp/lU1FCoyIAuPs2qwVsHLKEMpnQ4scEpr
MB6wf8vx50+dK27MAW/Oa3MaNOfS85FuJsqJ+rqqfUHNI95A6MVGW0ocQ8EeHpna
tGY6QC+xfaiLHfd2u7PR+kFUhMC7G94C37rJtF3vqh+x7gUhsEgtzMRpF6tB5FpV
ge5zWY9TIWQ7KejLv0VwIdv4cdR4TcMpjG7Kw2wdExEytoINX0L+ATL7Sg3WN1Cv
viAct9D4LyHa/Sov1hudC6VXvLBvvzmHTSThVKgW5thNrut279DMXaHCasPLXSIa
WK8+MP77LKh9MjsSP1R61GQgZh6y4/hn/E7g/RB3e17oTUzUqc1UsOQa/2nJlyF0
imHpnC2KPiZMb9FMcrwtRG2K7fOSwOVIctVHnIykM27oZA8usjNmdBdmOGzcJR5F
wcnkgIOTOsUKaymYNOAeBYH3FmkG/RAjfavsvXACMyDpiaeucHaR6oNtK47MJHCu
qnr4kNE/TtpH9Wbx0GoV
=vJk+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to