Har*_*ish -2 java out-of-memory geoserver tomcat8
我正在尝试从WFS请求中获取所有功能作为json,如下所示
http://localhost:8080/geoserver/DATA/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=DATA:species&outputFormat=application/json
Run Code Online (Sandbox Code Playgroud)
我因为内存不足而出错
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2.0" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
<ServiceException>
java.lang.RuntimeException: java.io.IOException java.io.IOException null Ran out of memory retrieving query results. Java heap space
</ServiceException>
</ServiceExceptionReport>
Run Code Online (Sandbox Code Playgroud)
如何解决此内存问题或增加tomcat8中的内存?
如果安装正确,则可以在ubuntu中配置tomcat 8 /etc/default/tomcat8。例如,要有2048MB的堆,请更改JAVA_OPTS为包括-Xmx2048m:
JAVA_OPTS="-Djava.awt.headless=true -Xmx2048m"
Run Code Online (Sandbox Code Playgroud)