为什么我无法在生产服务器上运行服务? [英] Why I am unable to run service on a production server?

查看:79
本文介绍了为什么我无法在生产服务器上运行服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个存档数据的Windows服务。服务安装很好并且在测试服务器上成功运行。但是在生产服务器中出现了问题

服务无法及时响应。构建与工作相同。



我尝试过:



已安装Data Archival的Windows服务并在测试服务器中运行。但是在生产中服务器问题仍然存在。

I have developed a windows service to Archive data. The service installation is fine and running successfully on the test servers. But in production server there is an issue coming
"Service could not respond in a timely fashion". The build is the same as that worked.

What I have tried:

Installed windows service for Data Archival and ran in test server. But in production Server Issue persists.

推荐答案

好吧,你向我们展示了任何代码,但我建议你的服务启动OnStart()代码是重。你可以通过线程/安排你的程序从服务经理那里请求'更多时间',这样OnStart()快速完成'(* 1)



这可能还有帮助: -



well, you havnt shown us any code, but I'd suggest your service startup OnStart() code is 'heavy' .. you can request 'more time' from the service manager by either threading it/arranging your program so OnStart() finishes 'quickly'(*1)

this may also help :-

ServiceBase.RequestAdditionalTime(4000);  // 4 seconds 





(* 1)'迅速'是一个相对术语 - 我无法记住默认值: - (



(*1) 'quickly' is a relative term - I cant remember what the default is :-(


这篇关于为什么我无法在生产服务器上运行服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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