是“InProc”吗?适合生产会话状态? [英] Is "InProc" suitable for production Session State?

查看:50
本文介绍了是“InProc”吗?适合生产会话状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们喜欢ASP.NETSession。概念并充分利用它。但是,接近部署,我们发现我们经常丢失会话,可能是因为

应用程序重启等等。我们希望消除这些重启,但我们''重新

不确定是否可以实现。 (我们正在探索谁/什么可能会触摸

web.config或程序集或我们的应用程序中的其他文件,但到目前为止找不到

。)


如果我们所有的会话都要做,我们会做一些严肃的改写

serializable因此适用于State Server或SQL Server持久性。


一个更大的重写问题涉及我们的大部分状态事实。是

与所有相关临时表和

记录集的实际SQL Server连接。 (我们不能使用ADO.NET,只需调用我们的遗留API,即基于ODBC的
。当ASP.NET会话消失时,我们放弃了数据库
$ b也是$ b连接。)


那么,期望在生产

应用程序中使用InProc模型是否现实?是否只是不可能确保合理的时间段

应用程序重启不会发生?


任何想法都将非常感谢!我们正在努力达到会议的稳定性和部署的稳定性方面。


James

We love the ASP.NET "Session" concept and make good use of it. But, getting
close to deployment we find we lose sessions far too often, probably due to
application restarts, etc. We hope to eliminate these restarts, but we''re
not sure that can be achieved. (We are exploring who/what might be touching
web.config or assemblies or other files in our application, but have found
nothing so far.)

We have some serious rewriting to do if all our session stuff is to be made
"serializable" and thus suitable for State Server or SQL Server persistence.

An even bigger rewrite issue concerns the fact that much of our "state" IS
an actual SQL Server connection with all associated temp tables and
recordsets. (We can''t use ADO.NET and just call our legacy API which is
ODBC based. When the ASP.NET session goes away, we let go of the DB
connection too.)

So, is it realistic to expect to use the InProc model in a production
application? Is it just impossible to ensure reasonable periods of time
where application restarts will not occur?

Any thoughts will be very much appreciated! We''re working hard to get up to
speed on session and stability aspects of deployment.

James

推荐答案

re:
那么,期望在生产应用程序中使用InProc模型是否现实?


简答:没有。


re:是否无法确保应用程序重启的合理时间段
不会发生?


无论参数如何,都会发生应用程序重启。


保存状态只有在你支付时才可靠

使用State Server或SQL Server来维护状态。


Juan T. Llibre,ASP.NET MVP

ASP.NET FAQ:< a rel =nofollowhref =http://asp.net.do/faq/target =_ blank> http://asp.net.do/faq/

Foros de ASP.NET en Espa?ol: http://asp.net.do / foros /

=================================== ===

" James Hunter Ross" < JA ******** @ oneilsoft.com>在消息中写道

news:%2 **************** @ TK2MSFTNGP15.phx.gbl ...我们喜欢ASP.NETSession概念并充分利用它。但是,接近部署我们发现我们经常失去会话,可能是由于应用程序重启,
等等。我们希望消除这些重启,但我们不确定是否可以实现。 (我们正在探索在我们的
应用程序中触摸web.config或程序集或其他文件的人/什么,但到目前为止一无所获。)

我们有一些认真的如果要完成所有会话内容,则重写。
serializable因此适用于State Server或SQL Server持久性。

更大的重写问题涉及我们的大部分状态事实。是与所有关联的临时表和记录集的实际SQL
服务器连接。 (我们不能使用ADO.NET
,只需调用我们基于ODBC的遗留API。当ASP.NET会话消失时,我们也放弃了数据库连接。) />
那么,期望在生产应用程序中使用InProc模型是否现实?是否只是不可能确保应用程序重启不会发生的合理时间段?

任何想法都将非常感谢!我们正在努力加快部署和会议稳定性方面的速度。

James
So, is it realistic to expect to use the InProc model in a production application?
Short answer : no.

re: Is it just impossible to ensure reasonable periods of time where application restarts
will not occur?
Application restarts will occur anyway, no matter the parameters.

Preserving state will only be reliable if you
use State Server or SQL Server to maintain state.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
======================================
"James Hunter Ross" <ja********@oneilsoft.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl... We love the ASP.NET "Session" concept and make good use of it. But, getting close to
deployment we find we lose sessions far too often, probably due to application restarts,
etc. We hope to eliminate these restarts, but we''re not sure that can be achieved. (We
are exploring who/what might be touching web.config or assemblies or other files in our
application, but have found nothing so far.)

We have some serious rewriting to do if all our session stuff is to be made
"serializable" and thus suitable for State Server or SQL Server persistence.

An even bigger rewrite issue concerns the fact that much of our "state" IS an actual SQL
Server connection with all associated temp tables and recordsets. (We can''t use ADO.NET
and just call our legacy API which is ODBC based. When the ASP.NET session goes away,
we let go of the DB connection too.)

So, is it realistic to expect to use the InProc model in a production application? Is
it just impossible to ensure reasonable periods of time where application restarts will
not occur?

Any thoughts will be very much appreciated! We''re working hard to get up to speed on
session and stability aspects of deployment.

James



你开始时的设计非常差,不可扩展,所以现在你处于

创可贴模式。我不会在任何生产应用程序中使用inproc会话,除非

会话数据可以在回收中重新生成。


停止回收由于不活动,请务必关闭回收。另外

设置内存限制非常高,(如果由于内存占用而创建的会话太多,则可能会发生回收)。只在非工作时间部署修复

(因为这将导致回收)。关闭反病毒软件扫描

你的vdirs。


- 布鲁斯(sqlwork.com)


James Hunter Ross < JA ******** @ oneilsoft.com>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP15.phx.gbl ...
you started out with a pretty poor, non-scalable design, so now you are in
band-aid mode. i wouldn''t use inproc sessions for any production app, unless
the session data can be regen''d on a recycle.

to stop recycles be sure to turn off the recycles due to inactivity. also
set the memory constraints very high, (recycles may happen if too many
sessions are created due to memory footprint). only deploy fix at off hours
(as this will cause a recycle). turn off anti-virus software scanning of
your vdirs.

-- bruce (sqlwork.com)

"James Hunter Ross" <ja********@oneilsoft.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
我们喜欢ASP.NET会话概念并充分利用它。但是,接近部署我们发现我们经常丢失会话,可能是由于应用程序重启等等。我们希望消除这些重启,但我们不确定可以实现。 (我们正在探索
在我们的
应用程序中是谁/什么可能触及web.config或程序集或其他文件,但到目前为止一无所获。)

我们有一些认真的如果我们所有的会话内容都是可序列化的,则重写。因此适用于State Server或SQL Server
持久性。

更大的重写问题涉及我们的大部分状态事实。是一个实际的SQL Server连接,包含所有相关的临时表和
记录集。 (我们不能使用ADO.NET,只需调用基于ODBC的遗留API。当ASP.NET会话消失时,我们也放开了DB
连接。) />
那么,期望在生产应用程序中使用InProc模型是否现实?难道不能确保合理的时间段吗?应用程序重启不会发生?

任何想法都将非常感谢!我们正努力工作以加快部署的会话和稳定性方面的速度。

James
We love the ASP.NET "Session" concept and make good use of it. But,
getting close to deployment we find we lose sessions far too often,
probably due to application restarts, etc. We hope to eliminate these
restarts, but we''re not sure that can be achieved. (We are exploring
who/what might be touching web.config or assemblies or other files in our
application, but have found nothing so far.)

We have some serious rewriting to do if all our session stuff is to be
made "serializable" and thus suitable for State Server or SQL Server
persistence.

An even bigger rewrite issue concerns the fact that much of our "state" IS
an actual SQL Server connection with all associated temp tables and
recordsets. (We can''t use ADO.NET and just call our legacy API which is
ODBC based. When the ASP.NET session goes away, we let go of the DB
connection too.)

So, is it realistic to expect to use the InProc model in a production
application? Is it just impossible to ensure reasonable periods of time
where application restarts will not occur?

Any thoughts will be very much appreciated! We''re working hard to get up
to speed on session and stability aspects of deployment.

James



Juan T. Llibre写道:
Juan T. Llibre wrote:
re:
那么,期望在
生产应用程序中使用InProc模型是否现实?
So, is it realistic to expect to use the InProc model in a
production application?



简短回答:不。

重新:



Short answer : no.

re:

是否无法确保
应用程序重启的合理时间段发生?
Is it just impossible to ensure reasonable periods of time where
application restarts will not occur?



无论参数如何,都会发生应用程序重启。

如果您使用State Server或SQL,保留状态将是可靠的服务器维护状态。



Application restarts will occur anyway, no matter the parameters.

Preserving state will only be reliable if you
use State Server or SQL Server to maintain state.




我不同意。我与每天运行大型网站的企业客户合作,每天使用InProc,没有任何问题。有时候使用

out-of-proc会话状态是一个好主意,但app重启并不是他们中的一个。你应该解决这个问题。


app域重启有其他缺点。每次发生这种情况时,你都需要备份

应用程序。这意味着你必须重新JIT,堆必须重新成长,b / b必须重新建立分配模式等等。

它只是一个如果你能够避免它,那么允许app域重启会定期发生的坏主意。根据我的经验,你总是可以。


如果你给微软打电话,你可以得到一个HttpModule,它设计为

跟踪app域重启,当它们发生了,为什么。


-

Jim Cheshire

JIMCO软件
http://www.jimcosoftware.com




I disagree. I work with enterprise customers running huge Web sites every
day that use InProc without a problem. There are times when using
out-of-proc Session state is a good idea, but app restarts isn''t one of
them. You should address that problem.

There are other drawbacks to app domain restarts. You have to start your
app back up each time this happens. That means you have to re-JIT, heaps
have to be re-grown, allocation patterns have to be re-established, etc.
It''s just a bad idea to allow app domain restarts to occur regularly if you
can avoid it. In my experience, you always can.

If you give Microsoft a call, you can get an HttpModule that is designed to
track app domain restarts, when they occur, and why.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com



这篇关于是“InProc”吗?适合生产会话状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆