C# IIS SMTP:超出存储分配响应
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/305837/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
IIS SMTP: Exceeded storage allocation response
提问by Jim Geurts
Hey all. We're sending quite a few emails (around 23k) using IIS6 SMTP service and receive about 7-8 error messages each time. The stack trace is:
大家好。我们使用 IIS6 SMTP 服务发送了相当多的电子邮件(大约 23k),每次收到大约 7-8 条错误消息。堆栈跟踪是:
System.Net.Mail.SmtpException: Exceeded storage allocation. The server response was: 4.3.1 Session size exceeds fixed maximum session size
at System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)
at System.Net.Mail.DataStopCommand.Send(SmtpConnection conn)
at System.Net.Mail.SmtpConnection.OnClose(Object sender, EventArgs args)
at System.Net.ClosableStream.Close()
at System.Net.Mail.MailWriter.Close()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
Our SMTP configuration is:
我们的 SMTP 配置是:
Limit message size: 2048k
Limit session size: 20240k
Limit # of messages per connection: 20
Limit # of recipients per message: 100
Is it as simple as adjusting the session size? If so, what is recommended? Should we just uncheck limit session size?
是否像调整会话大小一样简单?如果是这样,推荐什么?我们应该取消限制会话大小吗?
I don't claim to be an expert with SMTP setups, but if I can eliminate these error messages, that would seem like a step forward.
我并不声称自己是 SMTP 设置方面的专家,但如果我能消除这些错误消息,那似乎是向前迈进了一步。
Thanks
谢谢
Jim
吉姆
采纳答案by LarryF
Jim, this seems like it's running out of disk space storing all the temp queue files to be sent out. Which is why you only see the error a couple times. As it sends the messages, I'm sure it cleans up the temp files, making room for more. Keep in mind that you can send emails MANY, MANY times faster than the SMTP server can deliver them to the world, and thus, you can create a hell of a queue.
Jim,这似乎磁盘空间不足,无法存储所有要发送的临时队列文件。这就是为什么您只会看到几次错误。当它发送消息时,我确信它会清理临时文件,为更多文件腾出空间。请记住,您发送电子邮件的速度可以比 SMTP 服务器将它们传送到世界的速度快很多倍,因此,您可以创建一个非常糟糕的队列。
The failed deliveries don't help either...
失败的交付也无济于事......
I would look at a config option that sets the limit of how much drive space it's allowed to use for temp files.
我会查看一个配置选项,该选项设置了允许用于临时文件的驱动器空间的限制。
The session limit is probably only for a said CONNECTION to your SMTP server, and only allows so much data to be pumped into your SMTP server before it says, "woah buddy..".
会话限制可能仅适用于与您的 SMTP 服务器的所述 CONNECTION,并且只允许在它说“哇,伙计……”之前将如此多的数据泵入您的 SMTP 服务器。
回答by Cerveser
I've got the exact same error message on a Windows Server machine and changing the "Limit message size" to a bigger size resolved the error.
我在 Windows Server 机器上收到了完全相同的错误消息,并将“限制消息大小”更改为更大的大小解决了该错误。
On a Windows Server 2012 machine you can find the IIS SMTP server settings using the search charm and search for IIS. On the tap messages you can change the message size.
在 Windows Server 2012 计算机上,您可以使用搜索超级按钮找到 IIS SMTP 服务器设置并搜索 IIS。在点击消息上,您可以更改消息大小。