OpenSearchServer:为什么我得到这个错误Error(java.lang.NullPointerException) [英] OpenSearchServer: Why am I getting this error Error (java.lang.NullPointerException)

查看:428
本文介绍了OpenSearchServer:为什么我得到这个错误Error(java.lang.NullPointerException)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用OpenSearchServer v1.2.4 rc3。

在前几天它工作正常。

但是当索引大小达到1.0GB时,我收到此错误

I am using OpenSearchServer v1.2.4 rc3.
In the first few days it's working fine.
But when its Index size reached 1.0GB I got this error


Error(java.lang.NullPointerException)

"Error (java.lang.NullPointerException)"

当我开始我的爬行器。该抓取工具可正常工作一段时间,然后停止出现此错误

when I start my crawler. The crawler works fine for some time and then stops with this error


错误(java.lang.NullPointerException)。

"Error (java.lang.NullPointerException)".

有什么问题?

推荐答案

根据索引的大小,必须添加一个内存参数。默认情况下,OpenSearchServer设置为使用Java虚拟机提供的默认RAM值(仅从64MB到512MB)在小型服务器上运行。

Depending of the size of your index, a memory parameter must be added. By default, OpenSearchServer is setup to run on small server with the default RAM value provided by the Java Virtual Machine (from 64MB to 512MB only).

对于大型索引必须设置一个更高的值。在Unix / Linux服务器上,只需创建一个包含以下内容的 / etc / opensearchserver 文件:

For large indexes, you must set up a higher value. On a Unix/Linux server, just create an /etc/opensearchserver file with the following content:

CATALINA_OPTS="-Xms2G -Xmx2G -server"
export CATALINA_OPTS

,请编辑 start.bat 文件。在后添加以下行:okExec

On a Windows server, edit the start.bat files. Add the following line just after :okExec

set CATALINA_OPTS="-Xms2G -Xmx2G -server"

将2G(意味着2 GB)替换为您要分配给OpenSearchServer的内存大小。

Replace 2G (which mean 2 GB) by the size of the memory you want to allocate to OpenSearchServer.

在32位版本中,内存限制为2.5GB。您可以使用以下行在64位操作系统上使用更多内存(在Unix / Linux上):

In a 32 bits version, the memory is limited to 2.5GB. You can use more memory with a 64 bits operating system using the following lines (on Unix/Linux):

 CATALINA_OPTS="-Xms12G -Xmx12G -d64 -server"

用于窗口64位:

set CATALINA_OPTS="-Xms12G -Xmx12G -d64 -server"

重新启动OpenSearchServer后,只需检查运行时选项卡面板中是否有正确的内存大小。

After restarting OpenSearchServer, just check in the Runtime tab panel that you have the correct size of memory available.

有关错误详细信息,更有用的是具有完整的堆栈跟踪。您可以在日志文件(data / logs / oss.log)或运行时/日志选项卡面板中找到它。

Regarding the error details, it is more useful to have the full stack trace. You can find it in the log file (data/logs/oss.log), or in the Runtime/Logs tab panel.

这篇关于OpenSearchServer:为什么我得到这个错误Error(java.lang.NullPointerException)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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