As Colin says, you need to look at your Rails app's performance
(NewRelic rpm is extremely helpful) but 256mb is very limited to
run a Rails app *and* a Java app server.
You need to look at how Solr is configured, what JVM is in use,
how much memory it's using, etc.