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.

Jeff Coughlin's Gravatar Were you getting heap stack traces? Did you try increasing the default RAM settings for Solr from 256 to something like 1024 (assuming you can spare the RAM)? Maybe you were taxing it.
# Posted By Jeff Coughlin | 6/10/11 10:28 AM
Nathan Mische's Gravatar I was not getting any error messages and the same tests were running fine on Ubuntu 8.04 using the default Solr config. Having said that, the first thing I did was increase the heap size for Solr, but that didn't resolve the issue.
# Posted By Nathan Mische | 6/10/11 11:59 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.