Adding SessionEnd pipeline processor affects Sitecore Analytics?
I discovered a troubling anomaly this morning while reviewing our monthly Sitecore Analytics reports. Our average 'time on site' this month reach an average of about 9 minutes. This is up from an average of around 1-2 minutes for the previous month.
My first reaction was "great, looks like we're doing better 开发者_如何学运维this month", but after further investigation, it appears as though each and every visit to the site is recording a 20-25 minute 'time on site' statistic - even for single page visits.
Has anyone experienced this before? It appears as though the addition of a SessionEnd processor causes Sitecore to keep each and every Session alive for the default duration of 20 minutes. If that's true, how does one add a custom SessionEnd pipeline processor without affecting the 'time on site' statistic for every visit?
Sitecore version: 6.4.1 Update 1
UPDATE
Unfortunately, site traffic is still being recorded above 20 minutes for each visit... and this is with the custom SessionEnd processor completely removed. I am currently investigating other possible causes.
UPDATE 2
We are seeing many Analytics warning message appear in our logs that look like the following:
Analystics: Max size of insert queue reached. Dropped 3826.
I now believe this is somehow related...
UPDATE 3
I discovered that the 'time on site' statistics would go back to normal after restarting the Sitecore application. From there, the average time on site would gradually climb at a rate of about 1 minute every 10 minutes or so until leveling out around 20 minutes. I believe that's around the same time we start seeing the 'Max size of insert queue reached' warnings in our logs.
I also discovered that the actual 'time on site' figure is calculated from the average time-span between the [Session].1680504200
and [Session].[LastPageTimestamp]
columns in the [Sessions]
table. What's interesting here is that the newest records entering the Session table appear to have a [LastPageTimestamp]
of the actual time they are inserted into the table. It's as if the INSERT statement uses GETDATE() to stamp each record as they are inserted into the database. If that's true, then I think I found the culprit. I believe I have a performance issue on my hands, and to make matters worse, the queued Sessions are being inserting into the database incorrectly.
Don't know the answer to this question... but the first thing I would do is take apart the existing sessionEnd pipeline code with Reflector and see if it's doing something tricky that you are essentially undoing by adding another processor.
In my web.config, the only processor seems to be Sitecore.Pipelines.SessionEndSaveRecentDocuments.
精彩评论