0

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)"

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

"Error (java.lang.NullPointerException)".

What's wrong?

Joao Figueiredo
  • 3,120
  • 3
  • 31
  • 40
Gopa Soft
  • 111
  • 1
  • 2
  • 11

1 Answers1

1

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).

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

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

set CATALINA_OPTS="-Xms2G -Xmx2G -server"

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

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"

for Window 64bits:

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

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

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.

Emmanuel Keller
  • 3,384
  • 1
  • 14
  • 16
  • I am using windows Server 2008 R2. How can I increase memory size on windows? – Rizwan Khan Apr 09 '12 at 08:20
  • Ok, I got it. It seems the you removed the unique key in the Schema/Field tab panel. It should be set to "URL". Can you check that ? – Emmanuel Keller Apr 09 '12 at 12:31
  • I've set URL field as unique. But I still getting this error "Error (java.lang.NullPointerException)" on Stopping the crawler. – Gopa Soft Apr 09 '12 at 14:20
  • I just created a ticket on OpenSearchServer bug tracker at SourceForge. [NPE with Web Crawler when no unique field is set](http://sourceforge.net/tracker/?func=detail&aid=3516114&group_id=260863&atid=1127398). Now you should optimize the index, and start the crawl again. – Emmanuel Keller Apr 09 '12 at 14:33
  • The problem is solved. Last night i create a new index for autocompletion. And adds the new index to privileges. But after failing the autocompletion method i delete the index and was to not removed from privileges. Now I removed from privileges. It's working fine. Thanks for help. – Gopa Soft Apr 09 '12 at 15:07