上半年做了一个asp.net的网站,第一次整,问题多多!web服务器是windows server 2003+IIS6.0,数据库服务器同为校园网,两个服务器之间的网速应该没什么问题。
Web服务器的配置为2核cpu,2G内存,用perfom查看当前连接,当连接数量达到70左右的时候cpu的利用率就超过70%,当连接数到300的时候,cpu、内存均百分百,无法访问。同样的机器配置,同样的网络环境,另一台jsp的web服务器2天内6万人选课,一点问题都没有。郁闷!
在web服务器上,除了另外有一个针对少数几台CS客户端使用的web Service服务之外,就只有这个asp.net的网站了,在设置上应用程序池的默认成形池页面的web园的最大进程书上设置为5,网站的session存放在aspnet_state里面。
其它方面,在asp.net的webcongfig文件里面设置如下:
<configuration>
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=000.000.00.00)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DB)));User ID=00; Password=0000; Unicode=True;Enlist=true;Pooling=true;Max Pool Size=500;Min Pool Size=0" providerName="System.Data.OracleClient"/>
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.OracleClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
</authentication>
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
</providers>
</roleManager>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
配置文件不好排版,见谅!
现在实在是搞不清楚是那个地方的设置影响到系统性能了,请大侠指点,感谢!
--
FROM 218.104.96.*