WCF启动的exe文件死了一半.为什么? [英] WCF launching exe that dies halfway. Why?

查看:89
本文介绍了WCF启动的exe文件死了一半.为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在Windows Server 2008 R2上有WCF Windows服务,它的工作只是充当客户端的远程exe启动器.有1个exe文件,它带有一些参数并进行一些后台工作,基本上是从sql进行一些批量复制并生成一些txt.exe本身如果在本地运行,则效果很好,一点问题都没有,交易破坏因素是从Windows启动时出现的wcf服务,该服务使用参数创建System.Diagnostics.Process,然后在新的Thread上调用.Start(),以便它可以同时处理多个请求.

因此,问题是一个孤立的怪异行为,其中,exe将被杀死,而不会发出通知,没有任何建议,没有错误消息,它只会在一半或更少的时间内死掉,但有时却并非总是如此.

这里的问题是,可能是什么原因造成的?该服务在SYSTEM帐户下运行,因此具有特权,我猜想它可能与内存或cpu的使用有关,因为该exe占用了大量的cpu,并且由于它在sql上运行许多功能,因此sql service几乎有一半的可用内存,但这只是一个疯狂的猜测.有什么想法吗???非常感谢任何愿意花时间回复的人.

Hi
I have a WCF windows service on a windows server 2008 R2 whose job is simply to act as a remote exe launcher from clients. There is 1 exe which takes some parameters and does some background work, basically some bulk copies from sql and generating some txts.The exe by itself if run locally, works perfectly good, no problem at all, the deal breaker comes when it launches from the wcf service which creates a System.Diagnostics.Process with the parameters and then calls the .Start() on a new Thread so it can process multiple requests concurrently.

So the problem is an isolated weird behaviour where the exe will be killed without notice, no advice, no error message, it just gets halfway or less and dies, but only sometimes, not always.

The question here is, what could be a possible cause? the service is running under the SYSTEM account so it has privileges, I was guessing that maybe it has something to do with the memory or cpu usage since the exe grabs a lot of cpu and since it runs many functions on sql, the sql service holds almost half the memory available, but that''s just a wild guess. Any thoughts??? Thanks a lot to anyone who can take time to reply.

推荐答案

假设您已实现了适当级别的异常处理,但未向您显示问题可能是...

将诊断信息写入系统日志(或文本文件).这将需要一段时间,因为除非您对中断的原因/原因有所了解,否则您必须先从宽泛的画笔开始,然后通过运行应用程序并查看会发生什么来缩小范围,然后
Assuming you''ve implemented an appropriate level of exception handling which isn''t showing you where the problem might be...

Write diagnostic info to the system log (or a text file). This is going to take a while because unless you have an idea of where/why it''s breaking, you''re doing to have to start with a broad brush and narrow it down by running the app and seeing what happens, and moving/adding logging code around.


经过几次测试和日志记录之后,似乎最终(我未获悉执行环境)所有内容都在Virtual Windows Server中进行了设置. 2008 R2和SQL Server版本在内存和允许的连接方面都非常有限,因此我们将测试环境更改为一些更合适的服务器,我们将进行一些测试,但发现很多不一致的情况,其中与服务器的远程和本地连接显示了奇怪的行为或数据库本身不可用.

非常感谢您的支持,我将在此线程中通知最终结果.

最好的问候!
After several testing and logging, it seems that in the end (I wasn''t informed of the execution environment) everything was set in a Virtual Windows Server 2008 R2 and the SQL server version was quite limited in regards of memory and allowed connections, so we''re about to change our test environment to some more adequate server, we''ll conduct some tests but we found plenty of inconsistent scenarios where remote and local connections to the server showed weird behaviours or unavailability of the database itself.

Thanks a lot for the support and I''ll keep this thread informed with the end result.

Best regards!


这篇关于WCF启动的exe文件死了一半.为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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