简体   繁体   English

VS开发服务器在回发时的内存使用量增加

[英]VS dev server memory usage increase on postback

I am using a simple mvc application with an image and a button. 我正在使用带有图像和按钮的简单mvc应用程序。 But on every postback, memory used by dev server increases and reaches about 100MB in about 50 postbacks. 但是在每次回发中,开发服务器使用的内存都会增加,并在大约50次回发中达到约100MB。

Is this a known issue about dev server and web applications? 这是关于开发服务器和Web应用程序的已知问题吗? Also, mvc is supposed to be stateless but why development server is taking so much space on postbacks. 而且,mvc应该是无状态的,但是为什么开发服务器在回发上占用了如此多的空间。 I'm asking this because If I host some complex mvc application in my server and many number of users are accessing my web site at the same time this could crash my server. 我之所以这样问是因为,如果我在服务器中托管了一些复杂的mvc应用程序,并且同时有许多用户访问我的网站,这可能会使我的服务器崩溃。 IIS server are also working like this, any thought about this. IIS服务器也在这样工作,对此有任何想法。

Actually, you don't have to worry about memory usage of the server. 实际上,您不必担心服务器的内存使用情况。 But at the same time you must follow the best practices to write your code. 但是同时,您必须遵循最佳实践来编写代码。 The server decides by itself the best time to collect the garbage and free unused memory. 服务器自行决定收集垃圾和释放未使用内存的最佳时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM