Coldfusion 服务出现故障时自动重新启动

发布于 2024-11-16 11:40:59 字数 655 浏览 1 评论 0原文

可能的重复:
应用程序超时时如何重新启动 Coldfusion 应用程序服务器?< /a>

目前我有一个 ColdFusion 应用程序导致服务器问题。 1-2 天后,服务不会响应,直到手动重新启动完成。 我知道我必须找出脚本中出了什么问题,我花了好几个星期的时间。 但待定时,我将制作一个脚本,如果出现错误,该脚本会自动重新启动 ColdFusion 服务。

我对批处理脚本等知识不多。但我猜测试将是对 .cfm 的请求,并且响应将一直提供到超时。 ?

有人遇到过这样的脚本吗?

配置:Win 2k8 Server R2 - Coldfusion 9(.0.0)

谢谢

Possible Duplicate:
How to restart Coldfusion Application Server when application is timeout?

Currently I have an ColdFusion application that causes server issues. After 1-2 days that serve doesn't respond until a manual restart is done.
I know that I had to find what is going wrong in my scripts and I spend time and time for several weeks.
But pending I would make a script that restart automatically ColdFusion service if it is bugged.

I have not many knowledge in batch script etc.. but I guess that the test would be a request to a .cfm and the response would be serve until a timeout. ?

Has anyone ever met a script like this ?

Config: Win 2k8 Server R2 - Coldfusion 9(.0.0)

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

失退 2024-11-23 11:40:59

这里有两件事

  1. 真正的方法是解决这个问题,你可以使用 Fusion Reactor 来做到这一点 - http ://www.fusion-reactor.com/fr/ 它将帮助您根据需要进行监控、重新启动和自我修复。

  2. 您可以创建一个批处理文件,并在运行该文件的 Windows 中创建一个计划任务。
    使用 Net Start / Net Stop 命令

net stop“Macromedia JRun CFusion 服务器”

net start“Macromedia JRun CFusion 服务器”

认为这可能并不总是有效,所以我有一个批处理文件:

c:\JRun4\uninstall\KillJRun.exe

net start“Macromedia JRun CFusion 服务器”

这对我有用。

Two things here

  1. The real way is to fix the issue and you can do that with Fusion Reactor - http://www.fusion-reactor.com/fr/ It will help you monitor and restart and self heal as it needs.

  2. You could create a batch file, and create a Scheduled Task in Windows that ran it.
    Using Net Start / Net Stop Commands

net stop "Macromedia JRun CFusion Server"

net start "Macromedia JRun CFusion Server"

Thought this may not always work so I have a batch file:

c:\JRun4\uninstall\KillJRun.exe

net start "Macromedia JRun CFusion Server"

Which works for me.

难得心□动 2024-11-23 11:40:59

最好的选择是使用 Pingdom 或其他服务器监控工具。当服务器出现故障(响应 503 错误,服务不可用)时,您可以让 Pingdom 向服务器上调用批处理文件的 PHP 脚本发送响应。我不确定 Pingdom 是否支持 ping 另一台服务器(如果服务器已关闭),但您可以将 Pingdom 电子邮件发送到收件箱,您的 PHP 可以每隔几分钟检查一次。

不过,这可能比找出脚本的问题更多。

编辑:您可能需要查看此问题。这仅在服务停止时才有效,而通常当脚本崩溃时 ColdFusion 会挂起。如果您运行导致服务器崩溃的脚本,然后查看该服务,如果它说已停止,那么这可能对您有用。

我要检查的另一件事是 JVM 内存。通常,崩溃是由于处理来自文件或数据库的大量数据而 JVM 没有足够的内存来执行此操作。

Your best bet is to use Pingdom or another server monitoring tool. When the server goes down (responds with a 503 error, service unavailable) you may be able to have Pingdom send a response to a PHP script on the server that calls a batch file. I am not sure if Pingdom supports pinging another server is one is down, but you could have Pingdom email to an inbox that your PHP can check every few minutes.

This may end up being more work than figuring out what is wrong with your script though.

Edit: You may want to look at this question. This will only work if the service has stopped, whereas usually when a script crashes ColdFusion it is hanging. If you run the script that crashes the server, then look at the service, if it says stopped, then this may work for you.

The other thing that I would check is the JVM memory. Often times crashes are due to processing large amounts of data from files or the database and the JVM doesn't have the memory to do that.

泅渡 2024-11-23 11:40:59

没有。当您的 CF 服务/服务器挂起时,它无法自动重新启动。唯一的一种方法是按 Windows 计划重新启动。

Nope. It cannot be restart automatically when your CF services/server is hanging. The only one way is to restart by windows schedule.

夜司空 2024-11-23 11:40:59

您还可以使用 Nagios+Plugins 在服务挂起时触发重新启动脚本。但遵循之前的建议&找出问题所在是你最好的选择。

You could also use Nagios+Plugins to fire a restart script when the service hangs. But following the previous advice & finding out what the problem is is your best bet.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文