Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6054917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:12:23+00:00 2026-05-23T08:12:23+00:00

I have a simple DataMapper/Sinatra app running on JRuby as a search service. I’m

  • 0

I have a simple DataMapper/Sinatra app running on JRuby as a search service. I’m getting sporadic error messages when searching (can’t find particular rhyme or reason), wondering if anyone else has run into similar problems.

The errors occur randomly and are themselves inconsistent.

Examples:

INFO: IOError - closed stream:
 org/jruby/RubyIO.java:2616:in `sysread'
 /usr/lib/jruby/lib/ruby/1.8/net/protocol.rb:135:in `rbuf_fill'
 org/jruby/ext/Timeout.java:99:in `timeout'
 /usr/lib/jruby/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
 /usr/lib/jruby/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
 /usr/lib/jruby/lib/ruby/1.8/net/protocol.rb:126:in `readline'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:2026:in `read_status_line'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:2015:in `read_new'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:1051:in `request'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:1037:in `request'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:543:in `start'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:1035:in `request'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:772:in `get'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/connection/net_http.rb:16:in `get'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/connection/requestable.rb:36:in `request'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/client.rb:34:in `request'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/sunspot-1.2.1/lib/sunspot/search/abstract_search.rb:35:in `execute'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/sunspot-1.2.1/lib/sunspot/session.rb:59:in `search'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/sunspot-1.2.1/lib/sunspot.rb:335:in `search'
 /var/www/search/application.rb:7:in `HEAD /search'

INFO: NoMethodError - undefined method `+' for nil:NilClass:
 /usr/lib/jruby/lib/ruby/1.8/net/protocol.rb:178:in `write0'
 /usr/lib/jruby/lib/ruby/1.8/net/protocol.rb:153:in `write'
 /usr/lib/jruby/lib/ruby/1.8/net/protocol.rb:168:in `writing'
 /usr/lib/jruby/lib/ruby/1.8/net/protocol.rb:152:in `write'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:1580:in `write_header'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:1535:in `exec'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:1049:in `request'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:772:in `get'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/connection/net_http.rb:16:in `get'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/connection/requestable.rb:36:in `request'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/client.rb:34:in `request'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/sunspot-1.2.1/lib/sunspot/search/abstract_search.rb:35:in `execute'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/sunspot-1.2.1/lib/sunspot/session.rb:59:in `search'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/sunspot-1.2.1/lib/sunspot.rb:335:in `search'
 /var/www/search/application.rb:7:in `HEAD /search'

INFO: IOError - stream closed:
 org/jruby/RubyIO.java:1978:in `close'
 /usr/lib/jruby/lib/ruby/1.8/net/protocol.rb:70:in `close'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:1059:in `request'
 /usr/lib/jruby/lib/ruby/1.8/net/http.rb:772:in `get'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/connection/net_http.rb:16:in `get'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/connection/requestable.rb:36:in `request'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/client.rb:34:in `request'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/sunspot-1.2.1/lib/sunspot/search/abstract_search.rb:35:in `execute'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/sunspot-1.2.1/lib/sunspot/session.rb:59:in `search'
 /usr/lib/jruby-1.6.0/lib/ruby/gems/1.8/gems/sunspot-1.2.1/lib/sunspot.rb:335:in `search'
 /var/www/search/application.rb:7:in `HEAD /search'

The errors seem to be a problem with something underneath Sunspot (RSolr or JRuby maybe?), but I’m at a bit of a loss as I can’t find a way to consistently reproduce the problem. I’ve tried slaughtering the Solr installation with requests to see if it is a problem with Solr/Tomcat, but I’ve yet to catch Solr/Tomcat dropping the ball.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:12:24+00:00Added an answer on May 23, 2026 at 8:12 am

    The problem was threading. By default, Sunspot’s session object isn’t thread-safe. In Sunspot::Rails, it uses a thread-safe object by default, but since this is Sinatra, you have to do this manually, like so:

    Sunspot.session = Sunspot::SessionProxy::ThreadLocalSessionProxy.new(Sunspot.config)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with DataMapper and Sinatra to create a simple app. Here's the
I have simple WCF Service Application (based on this tutorial : Getting Started ).
I have simple win service, that executes few tasks periodically. How should I pass
I have simple SSIS package in which On Error event handler I have created
I'm trying to make a simple room management service. The rooms have these properties:
I am writing simple blog with CodeIgniter and DataMapper and I have problem with
I have simple JSF2 application running on glashfish 3.1. I want to add a
I have simple chat program using WCF service. One service use for server and
I'm using Datamapper 1.0 with sinatra and sqlite3 as backend. I have some devices,
Have simple C# console app which imports text data into SQL. It takes around

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.