Issue with ColdFusion’s Built In Solr on Mac

I recently ran into an issue with ColdFusion's built in Solr search server where, while running Solr on Mac OS 10.6, Solr would unexpectedly crash. I was using a custom schema and attempting to use Solr's data import handler so I thought they may have had something to do with my problem. After some more testing I found that, even while using the stock schema provided by ColdFusion, Solr would crash under relatively light load. More testing and a fair amount of swearing eventually lead me to the -XX:+AggressiveOpts JVM argument. The Solr startup script used by ColdFusion on the Mac, cfsolr, sets this JVM argument.

I wasn't familiar with this argument so I had to go look it up. According to Oracle's documentation, you use the -XX:+AggressiveOpts option to "turn on point performance compiler optimizations that are expected to be default in upcoming releases." To be honest I'm not entirely sure what the "point performance compiler optimizations" are, but being wary of anything labeled aggressive I decided to remove this option and see what happened.

I ran my tests again and everything seemed to work. Solr was able to handle the load from my tests and the data import handler began working with my custom schema. I was back in business.

After making this discovery I'm still a little concerned as I'm not sure why the -XX:+AggressiveOpt was being used in the first place, but since I'm not running OS X in production I'm fine with making this adjustment on laptop for development. I'd definitely be interested to see if others have run into this issue or to find out more about the -XX:+AggressiveOpts JVM argument.

Solr Indexing of ORM Entities: SolrEntity

ColdFusion 9 introduced two new features, Hibernate based ORM and Solr full text search indexing, however using the two together never seemed as easy as it could be. In the Java world you have Hibernate Search or the SolrJ client, both of which allow you to easily include an entity in a Lucene/Solr search index via simple annotations. Taking those projects as inspiration I came up with SolrEntity, a base component that implements ColdFusion ORM event handler methods to manage indexing of an entity via simple annotations (custom metadata attributes).

[More]

BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.