EPiServer Output Cache clearing for no reason - asp.net-mvc

We recently put live EPiServer output caching, this works fine locally and on our staging sites. For some reason since going live yesterday pages don't seem to stay in the cache for long, if at all. I can't see any obvious reason for this aside from genuine traffic?
To implement caching I added [ContentOutputCache] to the get methods of certain controllers. Then updated the Application Settings with the following:
uiUrl="~/EPiServer/CMS/" httpCacheExpiration="12:0:0" httpCacheVaryByCustom="path" httpCacheVaryByParams="id,epslanguage"
Has anyone seen anything like this before. I can't figure out why the cache keeps being dropped. Interestingly chrome tells me that the content is coming from the cache but the page load time is upwards of 20 seconds at times ... other times it's instant (when the caching is working).
I am not logged in to the CMS and no one is publishing anything.
Please let me know if you need any more info as always any help greatly appreciated on this.
Thanks,
Dan

Related

Experiencing slow first time loads with Web Apps on Azure

I'm experiencing very slow load time (~10sec) for the first time a page is loaded by a browser. Once the page has loaded it will load quickly for subsequent requests for the page. I suspect that the application is loading the resources for page into memory. Is there a way to 'pre-load' all of the pages of the application before use? And to keep them loaded? It seems that after some time the slow load will return, possibly because of garbage collection.
I've tried a bunch of the strategies advised by other comments and questions. The Web App is set to be 'Always-On' and it is compiled into a single DLL.
Any help would be appreciated. Thanks.
Enable Application Insights and use profiling to identify the bottleneck. https://learn.microsoft.com/en-us/azure/application-insights/app-insights-profiler

Why is my website images are swapping and the page is hanging on iPhone web browsers only?

I have a website written in ASP.NET MVC (Razor). Recently, a few days ago the images on the website started swapping all over the place. When refreshing the site, it might just hang for quite some time or load all images correctly. So I plugged my iPhone to my Mac and used the web inspector to see whats going on. I found out that at the time of load the browser hangs on certain files. These files are either images or js libraries. The images are very small. Less then 10kb so it is not the size of the image.
This issue only happens on iPhones. I checked on several iPhones.
I have tried multiple Android devices, Mac and Windows computers and they all load fast and every image is in the right place - no issues.
I researched a bit and found out some interesting references to HTTP Pipelining. But if that was is the case, why would these issues start now?
I do not know what to thing anymore.
What am I trying to understand is why would that only happen on the iPhone?
Thank you,
Any clue would be appreciated.
I had the same issue. After months of breaking my head I decided to implement lazy load on all images. After that, swapping never occurred.
Page hanging could happen because of multiple reasons. I would definitely check the code again and in particular look for the way you handled unmanaged resources. More on unmanaged resources

Rails app: Trouble shooting frequent Handling RequestTimeOut errors

I have a large webb app of which I have recently been working hard to reduce load times. I have two controllers Generator (some 20.000 items) and Product (some 1.500 items) that have been slow for a while but I have worked with indexes and smart queries. On my dev app the app response time is about 500 ms.
From time to time I still get RequestTimeOut on the app and I need help trouble shooting this error. I understand what it means (a request has taken too much time) and I have installed the 'rack-timeout' gem and set it to 15 seconds (which works fine).
I have gone through the entire app (and especially the two slowest: Generator & Product) in search for time to save. I have had some issues with caching that I am currently trying to fix (caching would help quite a bit).
It seems that these timeouts happens mostly when bots (Yandex.ru especially) spiders through my site and especially goes through one generator after another. They may not be very slow any more but loading so many after another causes a lot of requests.
Now I am out of ideas and need some help in order to know what and how to continue my trouble shooting:
Is there anything else outside of response time that cause this
error? E.g. memory leakage or something? Or is it just a matter of
lots of requests on slow controllers?
I haven't been able to test it on my development platform. Is
there a way to benchmark and see how the app would handle
requests like from the bots? I seem to remember there was an
"Apache-thing" one could use to simulate traffic like this.
Any other ways of looking at the problem or trouble shoot this
issue from a high level point of view? Any ideas and
thoughts are welcome!

IIS 7 over time performance degrading when rendering partial views

I have several websites that are currently experiencing the following problem. Over time, rendering of a specific partial view (asp.net mvc 1) will degrade, and take around ten times longer than it does normally. I currently have a workaround, but it's far from ideal.
Take this node off our load balancer
Stop IIS
Delete all temporary asp.net files
Start IIS
Hit the site to get caches populated and views compiled
Put the node back on the load balancer's rotation.
I know that it's not the restarting of IIS fixing it, it seems that the temp asp.net files have to be deleted for this to work properly. After those steps are completed, performance on the site is much, much better for around three to six hours. After that, it goes back to being terrible. The partial view that's having issues pretty much just renders out some html with cached data. We have not been able to reproduce this issue in our dev environment at all, so we're pretty stumped. We're going to be upgrading our live environment shortly, so I'd just like to know what's causing this problem. If it's configuration related at all, I want to make sure it's fixed with our new setup. Anyone ever seen this before?
There could be many things at play here, an initial check list
confirm app is not deployed in debug mode
what logging do you use and is it being done excessively?
what is the bottleneck on the server when this happens? memory? then you might have to check for a leak
do you regularly recycle your app pools?
Can you give some more details on what this partial view actually does?
The solution for this problem was to clean up the temporary asp.net files. We integrated this step into our deploy process, and the site overall has been running faster.

MemCache, Rails, pages showing different data at different times

We've got a strange problem that is very hard to troubleshoot. We are looking for some assistance on methods that might help us troubleshoot this problem. We use memcache and thinksphinx. Recently we moved to a new server and suddenly elements on the pages are showing up missing.
So for instance, our home page has news items and latest files added. In one case I see that we are missing the last 2 news items. My developer checks and sees its there. 10 minutes later he checks and see all the news items missing. Check again 15 minutes later and missing 3 items.
We were able to notice that on the server move we had memcache set at 2mb, so we moved it up to 1gb. It looked like everything was fixed. However, now we are seeing similar inconsistencies when people are searching. Users will report problems, I will see them, send them to my developer and he sees different results. We both refresh and see something else.
We are able to realize this is somehow related to memcache and/or our thinkingsphinx, because when we clear and rebuild, everything acts normal.
My only assumption is that at some point we run out of memory in memcache, but it makes no sense that only certain data would not be shown.
Can anyone give any advice?
Thanks,
Will

Resources