Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Not able to delete Asset in 6.3 AEM

Avatar

Level 4

Hi All,

In AEM 6.3 author, using assets console, https://<hostname>:<port>/assets.html/content/dam/xyz, when we are try to delete any image, its failing with error,  “Failed to delete.”

And when we check in browser console, we are seeing the exception, POST https://<hostname>:<port>/bin/wcmcommand 500 (Server Error)

And if we expand the failing call, in the network tab, it shows below exception

The query read more than 500000 nodes in memory. To avoid running out of memory, processing was stopped.

Cannot serve request to /bin/wcmcommand in

com.day.cq.wcm.core.impl.commands.WCMCommandServlet

Exception:

java.lang.UnsupportedOperationException: The query read more than 500000 nodes in memory. To avoid running out of memory, processing was stopped.

Above exceptions suggests, we are missing some indexes, that’s why its reading/traversing more nodes, when we try to delete an image.

Could you please suggest, what index we should create, to resolve this issue?

Regards

Sreeni

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hello sreeni

The delete operation in AEM invokes a query in the background and considering the error you're facing, it appears that this query is running slow and/or running into query limits failing the delete operation.

The query that gets fired for this operation on an OOTB instance is something like

SELECT * FROM [nt:base] WHERE (ISSAMENODE(‘/content/dam/adobe-test/jpg3186.jpg’) OR ISDESCENDANTNODE(‘/content/dam/adobe-test/jpg3186.jpg’)) AND [cq:lastReplicationAction] = ‘Activate’

This query is being served by ntBaseLucene index and there has been issues raised in the past with the performance of this operation with this index. Further improvements will be included OOTB in the future,

In the meantime, the fix is to be on oak 1.6.5 or older, and then add -Doak.lucene.useActualEntryCount=true to the JVM parameter and restarting the server.

Best Regards,

Aneet Arora

View solution in original post

5 Replies

Avatar

Level 10

This is indeed strange and something I ahve never seen personally. I will see if this is a known issue.

Avatar

Correct answer by
Level 5

Hello sreeni

The delete operation in AEM invokes a query in the background and considering the error you're facing, it appears that this query is running slow and/or running into query limits failing the delete operation.

The query that gets fired for this operation on an OOTB instance is something like

SELECT * FROM [nt:base] WHERE (ISSAMENODE(‘/content/dam/adobe-test/jpg3186.jpg’) OR ISDESCENDANTNODE(‘/content/dam/adobe-test/jpg3186.jpg’)) AND [cq:lastReplicationAction] = ‘Activate’

This query is being served by ntBaseLucene index and there has been issues raised in the past with the performance of this operation with this index. Further improvements will be included OOTB in the future,

In the meantime, the fix is to be on oak 1.6.5 or older, and then add -Doak.lucene.useActualEntryCount=true to the JVM parameter and restarting the server.

Best Regards,

Aneet Arora

Avatar

Level 10

Hi sreenivasula

aneeta45259594​ has explained in detail !

Other option for you could be to raise a Daycare support ticket to see if they have any hotfix for the same.

Avatar

Level 4

Thank you Aneet Arora!

     The issue is solved. In fact this is a known issue in AEM 6.3 and there is an adobe Asset deletion hangs and takes more than a minute | AEM 6.3 helpex document on this.

Thanks for your help!

Regards

Sreeni

Avatar

Level 10

Excellent reply Aneet and I am glad it's solved.