Skip to main content
Inspiring
October 19, 2012
Question

SEVERE: The web application [/] created a ThreadLocal

  • October 19, 2012
  • 6 replies
  • 27587 views

Looking in coldfusion-error.logs I'm seeing a bunch of entries like

SEVERE: The web application [/] created a ThreadLocal with key of type [coldfusion.util.DateUtils$1] (value [coldfusion.util.DateUtils$1@6c59782f]) and a value of type [java.util.GregorianCalendar] (value [java.util.GregorianCalendar[time=1350663029000,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="America/Los_Angeles",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=America/Los_Angeles,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2012,MONTH=9,WEEK_OF_YEAR=42,WEEK_OF_MONTH=3,DAY_OF_MONTH=19,DAY_OF_YEAR=293,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=9,HOUR_OF_DAY=9,MINUTE=10,SECOND=29,MILLISECOND=0,ZONE_OFFSET=-28800000,DST_OFFSET=3600000]]) 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.

Oct 19, 2012 10:36:08 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks

SEVERE: The web application [/] created a ThreadLocal with key of type [coldfusion.util.DateUtils$1] (value [coldfusion.util.DateUtils$1@6c59782f]) and a value of type [java.util.GregorianCalendar] (value [java.util.GregorianCalendar[time=1350667603000,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="America/Los_Angeles",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=America/Los_Angeles,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2012,MONTH=9,WEEK_OF_YEAR=42,WEEK_OF_MONTH=3,DAY_OF_MONTH=19,DAY_OF_YEAR=293,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=10,HOUR_OF_DAY=10,MINUTE=26,SECOND=43,MILLISECOND=0,ZONE_OFFSET=-28800000,DST_OFFSET=3600000]]) 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.

Oct 19, 2012 10:36:08 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks

What could be causing that and how to resolve?

Thanks,

Phil

This topic has been closed for replies.

6 replies

Inspiring
March 19, 2015

I am seeing this too in a default installation of CF11 on windows 2012.

It appears to show up when cf service is started.

Charlie Arehart
Community Expert
Community Expert
March 20, 2015

FWIW, I find these errors showing up all the time in pretty much all CF 10/11 servers, and they have never seemed to be at all significant.

We could certainly argue that if they’re NOT significant that they should NOT be appearing, and someone could/should do a bug report for it.

But in the meantime, I’m just saying I’d not sweat it. Just my personal opinion, but I spend my days helping troubleshoot CF servers with folks, and this has never been an issue of concern, not once.

/charlie

/Charlie (troubleshooter, carehart. org)
Inspiring
November 13, 2013

We have this error too - could it be a problem with scheduled tasks being initialised on start up ?

The error seems to happen once for every scheduled task we have in CFADMIN.

We're on CF10 Standard which had an issue with schedule tasks after release ???

Nov 13, 2013 5:21:29 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks

SEVERE: The web application [/] created a ThreadLocal with key of type [coldfusion.util.DateUtils$1] (value [coldfusion.util.DateUtils$1@7ce474af]) and a value of type [java.util.GregorianCalendar] (value [java.util.GregorianCalendar[time=1384362572889,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="Europe/London",offset=0,dstSavings=3600000,useDaylight=true,transitions=242,lastRule=java.util.SimpleTimeZone[id=Europe/London,offset=0,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2013,MONTH=10,WEEK_OF_YEAR=46,WEEK_OF_MONTH=3,DAY_OF_MONTH=13,DAY_OF_YEAR=317,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=5,HOUR_OF_DAY=17,MINUTE=9,SECOND=32,MILLISECOND=889,ZONE_OFFSET=0,DST_OFFSET=0]]) 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.

. . . . . . We get 14of these

followed by 4 of

SEVERE: The web application [/] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@194ad86c]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@6f4582b8]) 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.

We're on CF10 Standard Update 11 ( it happened on update 4 too )  Win 2008,  IIS7.5  We're on GMT

It may be related but we have a very serious issue with the server not responding to flash remote calls under very modest load.

as follows - REMOTEOBJECT ERROR Client.Packet.Encoding Error deserializing client message. null

This problem started after a restart on November 5th ( GMT - first restart after the clocks changed ?? )

Could this be due to running out of threads / Mem leak due to the date error?

Participant
April 11, 2013

Hi there,

We've also been experiencing the same errors in our logs after the clock change to BST here in the UK.

I have been unable to find any other information relating to this issue online apart from this thread so have posted a bug to https://bugbase.adobe.com/index.cfm?event=bug&id=3540118

I will update this with any further information I find.

Kind regards,

Tom

Participating Frequently
April 11, 2013

Hi Tom,

I have added a note and a vote to your bug post.

The note i have added is below. If anyone has any suggestions for a workaround please do post them.

I have tried running the webserver config as administrator but this has not resolved the situation.
Changing your clock to Pacific time seems to stop the error, but then the server is on the wrong time.

Kind regards
Luke

Note added to Toms bug report:
I am also seeing this behavior, this is a new install updated to CF10 update 9. I have re-ran the webserver config tool as admin as per suggestions here: http://forums.adobe.com/thread/1085240 but to no effect.


The server clock is set to time zone (UTC) Dublin, Edinburgh, Lisbon, London.

If i change the clock to (UTC -0800) Pacific Time (US & Canada) i do not get the error.


The error in the logs is: Apr 11, 2013 4:02:18 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks

SEVERE: The web application [/] created a ThreadLocal with key of type [coldfusion.util.DateUtils$1] (value [coldfusion.util.DateUtils$1@6bbdcdd5]) and a value of type [java.util.GregorianCalendar] (value [java.util.GregorianCalendar[time=1365690925920,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="Europe/London",offset=0,dstSavings=3600000,useDaylight=true,transitions=242,lastRule=java.util.SimpleTimeZone[id=Europe/London,offset=0,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2013,MONTH=3,WEEK_OF_YEAR=15,WEEK_OF_MONTH=2,DAY_OF_MONTH=11,DAY_OF_YEAR=101,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=3,HOUR_OF_DAY=15,MINUTE=35,SECOND=25,MILLISECOND=920,ZONE_OFFSET=0,DST_OFFSET=3600000]]) 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

Participating Frequently
April 12, 2013

For anyone who has this issue with time and CF10 - are you using the version of Java that comes bundled with CF?

I was and i found that installing Java as a stand-alone (ie to c:\program files) then modifying the JVM.config file to point java home to the new location has solved the error.

Download Java from here: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

install it

navigate to C:\ColdFusion10\cfusion\bin\jvm.config

backup
open in notepad

change "java.home=C:\\ColdFusion10\\jre" to the new location - this was "java.home=C:\\Program Files\\Java\\jdk1.7.0_17\\jre" for me

save

restart CF

Participating Frequently
March 22, 2013

Any updates on this I am getting the same still in CHF 8 on ubuntu 12.04. Server is crashing about once every 24 hr, unknown yet if this is related to the cause.

Thanks,


~ Ben

Known Participant
March 25, 2013

I am having the same problem. 

When I run wsconfig.exe I have an empty list under "Configured Web Servers."  When I click Add... I get the following:

Note that the OK button is greyed out. If I choose another web server and then select IIS again, I do get the OK button. When I click Ok I get the message "An unknown error ocurred."

I'm confused by all this, because my server is functioning, so ... why does this tool think I'm not connected?

Anit_Kumar
Inspiring
March 27, 2013

Hi,

Did you try running the tool in Admin mode? If that doesn't work, please refer to http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf364104-7fd9.html for running the wsconfig tool via command line.

Regards,

Anit Kumar

BKBK
Community Expert
Community Expert
November 6, 2012

This definitely points to a severe problem. But it is not with your code. This occurs at the level of the Java Virtual Machine, and a ColdFusion library is the cause. A datetime class in the Java package coldfusion.util behaves in a way that can cause a memory leak.

It is significant that this occurs during shutdown. As the error message says, one or more ThreadLocal date objects that had been created couldn't be garbage-collected during shut-down. Such runaway rogue threads may retain references that survive a restart of a web application. This can eventually lead to a memory leak.

The following line from the error message tells us why we shouldn't panic: "Threads are going to be renewed over time to try and avoid a probable memory leak". However, the ColdFusion team should look into this while the going is still good.

Known Participant
November 2, 2012

I'm getting the same output in my ColdFusion-error.log files.  It seems to be preceded by the following lines

INFO: Stopping service Catalina

Nov 2, 2012 10:24:21 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks

Maybe it's just me, but anytime I see SEVERE in an error log I have some concern.

I currently have ColdFusion 10 Update 4 installed and I was getting the same errors with Update 2

Anybody have some input on this?

Charlie Arehart
Community Expert
Community Expert
November 3, 2012

[I'm updating my first reply here, from 2012 (when cf10 was released) to point readers to a much later reply I offered in 2015, currently at the end of this thread (now on the second page of them here). There I point out how this "problem" seems not really at all a "severe" one, despite the message. It's simply a message that appears at shutdown, whose number will depend on the number of cf sessions at the time. The messages don't CAUSE any hang, nor are they implying the result of any. 

 

Some may prefer to read the subsequent messages below, but even the offered workaround to change the jvm has not prevented the problem, which remains even in cf2021, as I write this update to my first comment from 2012.

 

HTH. The rest of my comment here was my first, naive, one as we scrambled in 2012 to understand this then-new message which started appearing with cf10, released that year. ]

 

Since you mention having applied updater 4, have you re-run the web server configuration? That’s a requirement for the CF10 updaters (mentioned on the updater page, but easily overlooked).

 

it may not make any difference, but I wanted throw it out in case it might.

 

Similarly, be aware that sometimes when you run the web server config tool, it may seem to “work” when it has not. I’ve found that it’s necessary to “run it as admin”, which means doing start>adobe>coldfusion 10 and then right-clicking on “web server onfig tool” to choose “run as administrator”.

 

Hope that may help.

 

 

 

/charlie

/Charlie (troubleshooter, carehart. org)
Known Participant
November 5, 2012

I did run the wsconfig tool as instructed, but I did not "run as administrator" as you suggested.  I'll give that a shot and let you know if anything changes.