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 8109421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:24:54+00:00 2026-06-06T01:24:54+00:00

I have a rails 3.2 app that uses 2 databases. One database is the

  • 0

I have a rails 3.2 app that uses 2 databases. One database is the default rails database (sqlite). The other database is MicrosoftSQL ODBC running on SQL Server 2008. It is connected to several factory machines, and it logs things like how many pieces the machine has produced.

New rows are added to this database (it’s just one big table… I did not design this) about every 3 seconds, so there are a LOT of rows.

Queries are performed based on a time frame. Here’s a simplified version of a query:

@results = History.find_by_sql("SELECT * WHERE created_at > SomeStartTime AND created_at < SomeEndTime")

The query works fine for time spans up to a few hours, until it returns more than about 3500 results. Any time frames longer than that and I get the error

undefined method `[]' for nil:NilClass

Does anyone know what’s going on here?

  • 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-06-06T01:24:55+00:00Added an answer on June 6, 2026 at 1:24 am

    Ok, I’m an idiot. I was running in development mode, and apparently any query that takes longer than half a second automatically does this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a standard Rails app that uses a database, sqlite3 and the webrick
I have a rails app that uses PDFKit to render pdf versions of webpages.
I have a small Rails 3.2.1 app that uses CarrierWave 0.5.8 for file uploads
I have a rails app that was working fine with sqlite but upon switching
I have a rails app that runs on Heroku using their standard postgres database
I have a Rails app that needs to expose values from a database as
I have an app running on my production server that uses the pg gem
I have a Rails app that uses Cloudfront as its CDN and sprockets to
I have a rails app that uses partials and in development everything works great
I have a rails app that uses Sunspot and Solr for search functionality. I'm

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.