I want this to be more of a discussion than anything.
So I have a website at www.utopiapimp.com. Right now it gets over 1 mil page views a day. There is a ton of dynamic data on this site that is always changing. Think "live stock ticker" but for a online web game. I've run into a deep snag.
I load a few static items from the db when the web app starts, but after that each time a user logs in, I make a out 15 db calls for that user and stuff that entire object into cache from those 15 db calls. On my server monitor I can see my 4 gbs of ram slowely inch up to only 2 gbs. Then something happens and I don't know what.
The 1 core CPU VPS ,starts sitting at 25% forever. Sometimes the processing spikes to well over 50%. But after about 20 mins the 2gbs or ram drops suddenly down to about 400 mgs never to recover.
I can repeat this over and over again. I don't know what is causing this but the meticulous side of me scanned the website and code over hard and found no real hang ups. I began to think maybe I access the cache and store too many things in cache but I truly haven't come to a conclusion.
So after hearing that scenario, can anyone suggest something I may be missing? Maybe the application crashes? And it struggles to restart with the amount of hits it receives and just keeps crashing?
Im pretty hung up on this issue and cant seem to find a solution.
Maybe upgrading to a better vps might work, but i don't want to upgrade nearly to find the same problem there.
Any help pr suggestions would be brilliant because I've been struggling over this for the past week and my users are really hammering for a solution.
EDIT
Ive contacted my hosting company and waiting for a response. Any other suggestions or ideas would be greatly appreciated...
thanks so much!
The section processmodel in machine.config contains a parameter memoryLimit which is normally at 60% of the available memory. Maybe that causes a reset of your application pool. Try to increase the amount to see wether this causes the reset.
Another possibility is that .NET gets short of memory and clears the cache. I used to create an admin page where I can have a look which objects are currently stored in the Cache.
EDIT: In case you store huge data in the session, the required memory increases with every user. After sesssion timeout, the required memory will be reduced. You should always try to avoid storing too much data in the session.