如何检测503服务暂时不可用错误的原因并处理? [英] How to Detect cause of 503 Service Temporarily Unavailable error and handle it?

查看:53
本文介绍了如何检测503服务暂时不可用错误的原因并处理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中多次收到错误 503 服务暂时不可用我想检测为什么会发生这个错误,如何?如果有日志文件或类似的东西,因为我不熟悉 apache.

i am getting the error 503 Service Temporarily Unavailable many times in my application and i want to detect why this error occurs, how ? if there's a log file or something like that, since i am not familiar with apache.

第二件事是,有没有可能处理这个错误,当它发生时 apache 重新启动?

second thing is that, is it possible to handle this error, that when it occurs apache is restarted ?

推荐答案

当然有一些 apache 日志文件.在您的 apache 配置文件中搜索Log"关键字,您肯定会找到很多.根据您的操作系统和安装位置可能会有所不同(在典型的 Linux 服务器中,它会是/var/log/apache2/[access|error].log).

There is of course some apache log files. Search in your apache configuration files for 'Log' keyword, you'll certainly find plenty of them. Depending on your OS and installation places may vary (in a Typical Linux server it would be /var/log/apache2/[access|error].log).

Apache 出现 503 错误通常意味着代理页面/服务不可用.我假设您正在使用 tomcat,这意味着 tomcat 要么不响应 apache(超时?),要么甚至不可用(停机?崩溃?).因此,很可能是连接 apache 和 tomcat 的方式出现配置错误,或者是 tomcat 中的应用程序甚至没有向 apache 发送响应.

Having a 503 error in Apache usually means the proxied page/service is not available. I assume you're using tomcat and that means tomcat is either not responding to apache (timeout?) or not even available (down? crashed?). So chances are that it's a configuration error in the way to connect apache and tomcat or an application inside tomcat that is not even sending a response for apache.

有时,在生产服务器中,也可能是您为 tomcat 服务器获得了过多的流量,apache 处理的请求比代理服务 (tomcat) 可以接受的多,因此后端变得不可用.

Sometimes, in production servers, it can as well be that you get too much traffic for the tomcat server, apache handle more request than the proxyied service (tomcat) can accept so the backend became unavailable.

这篇关于如何检测503服务暂时不可用错误的原因并处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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