http://blog.itpub.net/26687597/viewspace-1207571/
基于Oracle EBS R12,开发了一个Webservice用于返回某项主数据,当请求的数据量非常大的时候(大于6000行的数据量),Oracle应用服务器总是给返回一个500 Internal Server Error。请求数据量小的时候,Webservice运行没有问题,能够正常返回请求数据。
客户端接到的报错:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
The server encountered an internal error or
misconfiguration and was unable to complete
your request.<P>
Please contact the server administrator,
[email protected] and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.<P>
More information about this error may be available
in the server error log.<P>
</BODY></HTML>
解决方法
这种问题多是因为数据量太大,应用服务器处理超时,尝试调大Apache的Timeout,就可以解决问题。
注意:Oracle EBS的Apache配置参数在$INST_TOP/ora/10.1.3/Apache/Apache/conf下的httpd.conf
(并不是通常意义的Apache配置目录:$ORACLE_HOME/Apache/Apache/conf/httpd.conf)
修改Apache配置文件httpd.conf,适当提高Timeout参数(Timeout默认为300秒)
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
修改完参数后,需要重启Oracle EBS HTTP Server或者OC4J Service才能生效。
Restart opmn
$ADMIN_SCRIPTS_HOME/adopmnctl.sh stopall
$ADMIN_SCRIPTS_HOME/adopmnctl.sh startall
or
Restart OC4J service
$ADMIN_SCRIPTS_HOME/adoacorectl.sh stop
$ADMIN_SCRIPTS_HOME/adoacorectl.sh start
另外,Timeout参数到底需要修改到多少,需要一些测试才能找到边界,Timeout配置处于安全考虑也不要修改的太高,防止DoS Attachs.
The
TimeOut directive should be lowered on sites that are subject to DoS attacks. Setting this to as low as a few seconds may be appropriate. As TimeOut is currently used for several different operations, setting it to a low value introduces problems with long running CGI scripts.(Refer:
Link)
参考
500 Internal Server Error Causes Performance Issues (文档 ID 1389111.1)
Avoiding Worksheet Timeout in Oracle Demand Planning (文档 ID 779590.1)
TimeOut Errors - How To Extend TimeOut For Long Updates In APC/PIM/PLM Pages? (文档 ID 1165573.1)