CPU/Network Saturated After Sorting Content Nodes?
I sorted a few nodes (about 20) under my homepage node (using the right click, sort flyout) and the CPU/network has been maxed out for over half an hour:
Has anybody else experienced this? Is this how slow the sort feature usually works?
I wonder if maybe Umbraco is doing something (e.g., Examine indexing) with all descendant nodes (rather than just all child nodes) and that may be what is taking so much time. Either that, or an infinite loop of some sort.
Mystery solved, I think. I ran into this out of memory exception just now before the sort finished:
This occurred on a line that was inside of a function called by a ContentService.Saving event handler. This code appears to be creating child nodes under certain conditions. I'm thinking that this sort operation basically caused a publish operation on every content node, which triggered this event handler a bunch, which led to a ton of new content nodes and publish operations.
That explains the network saturation and CPU being pegged.
Probably a bit of both, but I didn't spend much time on it. I just commented out the event handler in question, as it was providing only a very minimal feature at an evidently great cost.
On the one hand, I'm curious why a sort operation would trigger saving/saved events. On the other hand, even though that seems to occur, the real problem was the event handler code that was seemingly extremely inefficient.
There is also the fact that Umbraco ran out of memory. This is probably an issue with how it manages publish operations and the XML cache (i.e., it didn't seem to be disposing of some large objects fast enough, which caused an out of memory exception).
CPU/Network Saturated After Sorting Content Nodes?
I sorted a few nodes (about 20) under my homepage node (using the right click, sort flyout) and the CPU/network has been maxed out for over half an hour:
Has anybody else experienced this? Is this how slow the sort feature usually works?
I wonder if maybe Umbraco is doing something (e.g., Examine indexing) with all descendant nodes (rather than just all child nodes) and that may be what is taking so much time. Either that, or an infinite loop of some sort.
Umbraco 7.4.3 (upgraded from Umbraco 6.1.6).
Mystery solved, I think. I ran into this out of memory exception just now before the sort finished:
This occurred on a line that was inside of a function called by a
ContentService.Saving
event handler. This code appears to be creating child nodes under certain conditions. I'm thinking that this sort operation basically caused a publish operation on every content node, which triggered this event handler a bunch, which led to a ton of new content nodes and publish operations.That explains the network saturation and CPU being pegged.
After commenting out the event handler, sorting took about 10 seconds. Much faster.
It's a bug or some code optimization to do?
Probably a bit of both, but I didn't spend much time on it. I just commented out the event handler in question, as it was providing only a very minimal feature at an evidently great cost.
On the one hand, I'm curious why a sort operation would trigger saving/saved events. On the other hand, even though that seems to occur, the real problem was the event handler code that was seemingly extremely inefficient.
There is also the fact that Umbraco ran out of memory. This is probably an issue with how it manages publish operations and the XML cache (i.e., it didn't seem to be disposing of some large objects fast enough, which caused an out of memory exception).
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.