Tomcat服务器提示:The server is temporarily unable to service your request due to maintenance downtime or

Posted victorlyw

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Tomcat服务器提示:The server is temporarily unable to service your request due to maintenance downtime or 相关的知识,希望对你有一定的参考价值。

今天网站突然不能访问了,这里做一下记录提示:

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. 
Please try again later. Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

造成原因分析:

一、网站超过了服务器限制造成的

二、数据库连接池是否已满,内存是否溢出

解决:

本次记录造成的原因是,服务器配置低,Tomcat logs目录下  catalina.out文件过大(24M) 造成服务器 暂停服务

1. 解决办法:

cd logs

echo > catalina.out #来清空内容

../bin/shutdown.sh #停止服务
../bin/startup.sh #启动服务

注意:这只能暂时解决,可能文件很快又会满了,当然升级服务器可能是最靠谱的解决办法

2. catalina.out日志level调整

既然日志文件catalina.out太大,那就调整它的日志记录等级,tomcat日志等级如下:

SEVERE (highest value) > WARNING > INFO > CONFIG > FINE(默认) > FINER > FINEST (lowest value)

# vim conf/logging.properties
###################
# Handler specific properties.
# Describes specific configuration info for Handlers.
###################
1catalina.org.apache.juli.AsyncFileHandler.level = OFF
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.

这里我就直接把它关闭了:1catalina.org.apache.juli.AsyncFileHandler.level = OFF,推荐使用WARNING
然后如第三步的shutdown再startup重启tomcat使之生效。

 





以上是关于Tomcat服务器提示:The server is temporarily unable to service your request due to maintenance downtime or 的主要内容,如果未能解决你的问题,请参考以下文章

解决eclipse中无法删除Tomcat服务器中的项目,报maven is required and cannot be removed from the server错误情况

windows 启动tomcat 提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

The Tomcat server configuration at ServersTomcat v7.0 Server at localhost-config is missing. Check(示

解决“The Tomcat server configuration at ServersTomcat v8.0 Server at localhost-config is missing. Ch(示

启动tomcat提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

The Tomcat server configuration at ServersTomcat v8.0 Server at localhost-config is missing. Check(示