Pergunta

We have a fairly big web based solution which runs on .Net 4.5. Recently, while we were examining a performance issue where the system seemed to be only serving one request at any given time (per client) we learned that the cause of that was the session state. By changing the EnableSessionState attribute to ReadOnly, multiple requests can be served simultaneously and performance was dramatically improved.

We thought maybe that we would run into all kinds of issues since we are relying on the session state for a number of things in our system, but so far we haven't really had any negative side effects at all. Logins work as expected and all the things we store in the session state also seem to work fine.

That begs the question ... why isn't this the default behaviour? Are there any obvious bad side effects of this that we just have not experienced yet?

Foi útil?

Solução

Still only 62 views?

Well we've been running this now for about 7 months with no bad side effects, only greatly improved performance. So The answer to my question is "I do not know and no".

Go ahead :-)

Outras dicas

Recently did set sessions to Readonly and it did initially speed up page response performance, we did noticed that any long running posts like a long report from another session would hog up the resources of the entire site, locking up everyone. Our solution was to offload any heavy report processes into a queue to a reporting engine and let the web focus on pages.

However with session set to full, it could distribute the CPU cycles better to each session and bear the brunt of the other heavy session. That was our observation.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top