IIS 7 中的文件上传会在 30 分钟后重新启动

IIS 7 中的文件上传会在 30 分钟后重新启动

问题

问题是,如果上传文件的时间超过 30 分钟,就会以不寻常的方式失败。我一直使用 Google Chrome 进行测试,几乎在 30 分钟时(上传量无关紧要,总是在约 1800 秒时发生),上传进度将重置为“0%”并重新开始。

浏览器没有显示任何出错的消息,只是重新启动了上传。(即使在开发人员工具中查看“网络”,也只显示单个发布请求)。查看服务器上的事件查看器也没有发现任何异常。我注意到,通常 ColdFusion 的临时上传文件会进入“ColdFusion9\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp”,并在上传完成或中止时被删除。当出现此问题时,这些临时文件不是已删除。

事实上,这种情况发生在完全不同位置的两个系统上,并且总是在 1800 秒,这让我认为某处一定有一些默认超时设置,但我就是找不到问题所在。

有人能提供建议去哪里查找或者(我知道这很疯狂)真正的原因是什么吗?

一些信息

测试系统配置:

Windows Server 2008 Standard & Windows Web Server 2008 R2
IIS 7 & 7.5
ColdFusion 9 Standard

我的表格如下:

<form name="frmUpload" method="post" enctype="multipart/form-data" action="upload.cfm?Action=Upload">
    <input type="hidden" name="Submit" value="1" />
    <input type="file" name="File" />
    <input type="submit" name="SubmitButton" value="Submit" />
</form>

我的 web.config 如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors existingResponse="PassThrough" />
        <urlCompression doDynamicCompression="true" />
        <defaultDocument>
            <files>
                <clear />
                <add value="login.cfm" />
                <add value="index.cfm" />
                <add value="index.htm" />
                <add value="index.html" />
            </files>
        </defaultDocument>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="2147482624" />
            </requestFiltering>
        </security>
    </system.webServer>
    <system.web>
        <httpRuntime executionTimeout="21600" maxRequestLength="2097151"/>
    </system.web>
</configuration>

当上传重新启动时,IIS 日志显示(注意最后两个值“bytes-received”和“time-taken”):

2012-06-07 17:35:02 192.168.200.184 POST upload.cfm Action=Upload 443 - 192.168.1.230 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/536.5+(KHTML,+like+Gecko)+Chrome/19.0.1084.52+Safari/536.5 500 0 0 1473 214483824 1800801

“coldfusion-out.log”文件中也有一些大约在同一时间发生的条目:

06/07 14:35:21 error unexpected end of part
java.io.IOException: unexpected end of part
at com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java:96)
at com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:191)
at com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:152)
at com.oreilly.servlet.multipart.FilePart.write(FilePart.java:257)
at com.oreilly.servlet.multipart.FilePart.writeTo(FilePart.java:215)
at coldfusion.filter.FormScope.fillForm(FormScope.java:253)
at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:377)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:33)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
at coldfusion.CfmServlet.service(CfmServlet.java:200)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

06/07 14:35:21 error (JRun Service: ProxyService  [jrun.servlet.jrpp.JRunProxyService@2cf889c8]) JRunPRoxyServer.invokeRunnable: 
java.lang.IllegalStateException
at jrun.servlet.JRunResponse.getWriter(JRunResponse.java:205)
at jrun.servlet.JRunResponse.sendError(JRunResponse.java:597)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:328)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

java.lang.IllegalStateException
at jrun.servlet.JRunResponse.getWriter(JRunResponse.java:205)
at jrun.servlet.JRunResponse.sendError(JRunResponse.java:597)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:328)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

相关内容