Running low on RAM with the FAST Search Database Connector?

In FS4SP, the FAST Search Database Connector is one of three specialized indexing connectors. In other words, they are specific to FAST Search Server 2010 for SharePoint (FS4SP), and not available if  you are “just” running SharePoint Server 2010.

For those of us who have been working with ESP, the FAST Search Database Connector is just another name for the JDBC Connector. It’s using the same code base (CCTK), and the same configuration. You can read more about it on TechNet: http://technet.microsoft.com/en-us/library/ff383279.aspx

Since the connector is using JDBC drivers to talk to databases, a Java run-time is a prerequisite. More specifically, the 32 bits JRE version 1.6 or newer.

For some reason or another, the 64 bits version is not supported. For simpler connector configurations, the memory you can allocate with a 32 bits should be enough. But if you need to tackle massive result sets, or have performance requirements and want to feed with lots of threads in parallel, you might end up getting the dreaded:

If you get this error when running the connector, start with making sure that your configuration is sound and healthy. If you’re throwing around really heavy and suboptimal SQL statements, look into reducing the footprint of those. The connector is by default configured to allow at most 1GB of RAM, and the absolute majority of configurations should be able to run within that amount.

But when you’re running out of optimization options, and just really need to allocate more memory, open up %FASTSEARCH%\bin\jdbcconnector.bat, and change the MAXHEAP variable. Depending on your setup, you can increase this limit a bit. But not too much, or you would run into this:

Congratulations, you’ve hit the 32 bits memory limit. Now, if you really need even more memory, it is actually possible to run the connector with a 64 bits JRE. As long as you:

  • Install the 64 bits JRE in its own little sandbox so it doesn’t affect anything else than the connector
  • Replace whatever system libraries your particular connector configuration is using for their 64 bits equivalents

Mind you, it’s not always possible to find 64 bits versions of the system libraries, so depending on your connector configuration you might just be out of luck. To find out if you are, just try and see if it breaks (on a test machine!):

Disclaimer: This is not supported! Tamper with the libraries, and you’re on your own.

  1. Download the latest version of the 64 bits JRE. Let’s assume you install it to the default directory C:\Program Files\Java\jre6. Make sure not to override the old one!
  2. Now, make the connector reference the new JRE. E.g. by modifying the initialization script %FASTSEARCH%\bin\jdbcconnector.bat. Change:
    set JAVA_HOME=%JAVA_HOME%
    to
    set JAVA_HOME=”C:\Program Files\Java\jre6”
  3. Open up a FS4SP PowerShell, and test your configuration with:
    .\jdbcconnector.bat testconnections -f YOUR_CONFIG.xml

The connector now tries to connect to the database, and then to FAST. Investigate whatever error message you get and see if you can resolve it. To give you an idea of what you’re up against, below is what I encountered on one of my deployments, and how I got around it.

I was trying to connect to a Microsoft SQL server using integrated security. The connector complained: “WARNING: Failed to load sqljdbc_auth.dll”. Here’s what I did:

  1. I downloaded the Microsoft JDBC 4.0 driver CTP (the archive, not the installer). At the moment, this is the most recent version of Microsoft’s JDBC driver. Note that CTP stands for “Community Technology Preview”, so do this on your own risk. If this scares you, this blog post is probably not for you.
  2. I then created the folder %FASTSEARCH%\lib\java64.
  3. In the downloaded archive, I extracted the files  sqljdbc4.jar and auth\x64\sqljdbc_auth.dll and put these in my newly created java64 folder.
  4. I then modified the Java library path in jdbcconnector.bat, and prepended it with my new java64 directory:
    SET EXT_DIR=..\lib\java64;..\lib;%JAVA_HOME%\lib;%JAVA_HOME%\lib\ext
  5. Voilà! The connector now ran successfully. More importantly, I could now increase the MAXHEAP even further.

Good luck! And remember: before changing the MAXHEAP and certainly before trying out the 64 bits JRE, make sure that you’re connector configuration is as efficient as possible. These options are your very last resorts.



Leave a response





XHTML: These tags are allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

301 Moved Permanently

Moved Permanently

The document has moved here.


OSLO

Comperio AS
Øvre Slottsgate 27
NO-0157 Oslo,
Norway
+47 22 33 71 00
View map

STOCKHOLM

Search Provider Sverige AB
Gamla Brogatan 34
SE-11 120 Stockholm
Sweden
+46 8-21 49 00
View map