How to really slow down and chew up RAM with Kentico

Eric Garrison asked on November 11, 2015 03:22

I wanted to let people know about an interesting situation on a Kentico 7.x install. We recently discovered that W3 / Worker process went from using 400K to 4-5GB. Adjusted cache, reviewed all code, try the 8.x upgrade (failed) etc. Nothing helped and the site kept resetting and running slow. What we found was that App_Data\CMSModules\WebAnalytics had +2 Million files in the directory. WebAnalytics was enabled, but this process seems to have run off the rails.

If you have, like us, have multiple sites on one instance, I would suggest you checkout this folder. I am in day 3 of trying to get all the files gone. This app did help: http://www.novirusthanks.org/products/fast-folder-eraser-pro/ Then running Raxco Perfect Disk Server helped.

I think because Kentico does us the disk so heavily, it just created a world of problems.

Should there be something that cleans up the files?

Recent Answers


Andrew Radburnd answered on November 11, 2015 08:14

Hi Eric,

I have come across this a few times.

You might want to check your scheduled tasks for a failed or disabled task.

Kentico writes the web analytics to disk and then a scheduled task runs and imports these files into the database. This removes the txt files from the disk.

If the task has been failing or has been stopped the folder grows very quickly.

https://devnet.kentico.com/docs/6_0/devguide/index.html?managing_analytics_data.htm

1 votesVote for this answer Mark as a Correct answer

Timothy Fenton answered on November 11, 2015 10:09 (last edited on November 11, 2015 10:09)

Yes, another thing we see quite often is the application pool identity does not have the correct permissions to remove files from the App_Data directory. You should confirm that the app pool identity has "Full Control" over everything in app_data. Also depending on your windows server version there could be a bug with frequent writes to app_data that causes app pool restarts, it was with Windows Server 2012 R2 and you can read more about this bug here:

https://devnet.kentico.com/articles/resolving-the-iis-configuration-change-issue

It may or may not be related, however you should definitely check the permissions

1 votesVote for this answer Mark as a Correct answer

Eric Garrison answered on November 11, 2015 13:33

That is good to know. We are on Windows 2008 R2 currently, but planning on deploying to 2012 very soon.

The Remove Analytic task was enabled and running monthly. It didn't show failed, but does have the external task check box, checked. Maybe we didn't get report back because of that.

This one kentico instance seem to still be using more RAM. 1.5 to 2.0 GB at times so there is likely something else missed. The code is identical to other instances on the same server, but this one is slower and using more ram, but speed is back to normal now that the 2 million file directory is gone.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on November 11, 2015 14:43

Eric,

I just went through a very very similar issue with a client who had analytics and all of the EMS features turned on. Unfortunately their database was over 150GB in size and all of the issues they were experiencing were due to a combination of the database size, the EMS features being turned on and none of the clean-up procedures put in place. Depending on your site, it could very well be a similar fix or it could also be some bad custom code being executed.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.