tracker issue : CF-4022002

select a category, or use search below
(searches all categories and all time range)
Title:

cacheRemove() throws an out of memory error when passing it a list of long key names

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Mike Grove / Mike Grove (Mike Grove)

Created: 07/16/2015

Components: Caching

Versions: 11.0

Failure Type: Memory Leak

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on July 24, 2017 using build 2016.0.01.298513
Problem Description:

Steps to Reproduce:

Run the following command in a .cfm file (Note: it does not matter if you have these items in the cache or not).

<cfset cacheRemove("	        en-us-2F0A7788-091D-46AA-B19300018B63DE86,
						en-us-23A52051-58AC-4DB9-97B001042A8BD810,
						en-us-D95CD973-E883-484F-919B040E04275B1A,
						en-us-97624E7A-F049-4BDB-894209794F10B7C9,
						en-us-13BAEBAA-6A4F-4095-B79D1283DE2519FA,
						en-us-FE6DD542-712D-4054-821D13A9A6BABA19,
						en-us-8D4A68CA-3FA2-4E89-86211D1CAE4FF02F,
						en-us-5068F8F9-3335-465B-BE811D4A9EC8D765,
						en-us-91062EF9-FBA1-4039-A9CC1D9FBD3E8AB6,
						en-us-A136AA4D-FEBC-4D0C-B97127C8FDC5015F,
						en-us-48BE2E4D-0ED1-4BBB-8E632823646329B0,
						en-us-48130A0C-753B-4A0E-A08929B97B2F1AE2,
						en-us-12B20094-E0F6-4BA6-B46D34C951918E79,
						en-us-CA8159CE-7E51-4F19-89FD3856521F98E3,
						en-us-7BCC3949-ABBC-43B3-8BB63D83692CAF8B,
						en-us-B00B6050-8697-4B1C-B6C0423A12ABA83B,
						en-us-1F220B60-DDB7-4BCA-AA0D46C423933C22,
						en-us-F0AC3A74-00D1-457A-A9C2497E57864A1F,
						en-us-6A793753-8739-4D2D-AF0F50F3818EC51E,
						en-us-77AEFB11-6F57-47B2-87905356A9B05B5A,
						en-us-8DB6A783-1DDF-422C-82F15915630FFD72,
						en-us-08DF979E-DC27-48C3-AEEC5AB8036BB5B9,
						en-us-44F0336D-EBDD-42BE-9BF5627341D6B3AA,
						en-us-745892D7-14C7-468F-BD42662026638CFB,
						en-us-1B4EA850-283A-41FC-8DD3791114170745,
						en-us-D2D03E9D-DA7D-4E4B-99857DBF4B6DF333,
						en-us-D5B3A6A0-701D-4421-BD9F82362F6AC930,
						en-us-D3B4CC66-A6E7-4880-9C2A8BF685F9633B,
						en-us-B8361307-2B26-4117-989F93D2416449B0,
						en-us-A9B9781B-621E-412F-A0B59764DD9E64AA,
						en-us-E6C606C6-45EA-40A9-A4F39EAD4BE8E50F,
						en-us-8568A550-013A-43AC-8E2DA04D25568B61,
						en-us-C89BCA05-3D6F-4993-8A3CA09A9E197456")>

Actual Result:

java.lang.OutOfMemoryError: Java heap space

Expected Result:

The cache will be cleared for all items in the list.

Any Workarounds:

There is a simple workaround which is to loop over the list and call cacheRemove() on each individual element.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4022002

External Customer Info:
External Company:  
External Customer Name: Mike
External Customer Email:  
External Test Config: Java: jdk1.7.0_45

Min Heap: 2048MB

Max Heap: 2048MB

MaxPerm: 256MB

Attachments:

Comments:

I've been able to reproduce with many less keys than in the example above. It is likely dependent on how much memory you allocate to the Java heap. Even with 2 Gigs, it was still very easy to reproduce if using UUID's as key names.
Comment by External U.
6597 | July 16, 2015 02:17:20 PM GMT
Verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Reproduced bug on CF11 Update 7 (build 11.0.07.296330) w/ heap min=256 and max=512 and keys parameter was a string list of 25 UUIDs. Note: When keys parameter is an array, there was no issue. With same heap size on CF11 Update 7, no OOM even when array contained 5,000 UUIDs. Thanks!, -Aaron
Comment by Aaron N.
6598 | July 24, 2017 04:42:32 AM GMT