문제

I have a session wrapper class in my ASP.NET MVC application that is used to store frequently used data (like current user info, supplier info etc) in Session. Session runs InProc. Everything works perfectly, but I know it is a bad design to have session in InProc mode as it is not scalable and it is tightly coupled to application pool. I didn't want to use Sql Server for managing sessions as it seems to be a last resort as speed is number 1 priority for us. So after doing a bit of research, it looked like Redis DB is the fastest option here (compared to MongoDB, RavenDB etc). I used this provider https://github.com/TheCloudlessSky/Harbour.RedisSessionStateStore. After implementing it as per instructions, it worked. But now I am getting occasional slow down of the site, where pages sometimes (probably 30% of the time) load very very slow. As soon as I switch it back to InProc mode it all runs fine. I wonder if I installed Redis incorrectly or there are some tricks that I have to do to make it run smoothly. Can anyone help? If you require bits of code, I can provide it, but it is pretty much the same as per https://github.com/TheCloudlessSky/Harbour.RedisSessionStateStore sample. CPU and Memory seems to be quite low and stable....

도움이 되었습니까?

해결책

There was an issue with Redis provider Nuget package. Contacted package owner and new version was released which seems to work fine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top