# Large amount of records brings error

**URL:** <https://www.ruby-forum.com/t/large-amount-of-records-brings-error/118823>\
**Category:** Rails\
**Created:** [October 31, 2007, 12:05pm UTC](https://www.ruby-forum.com/t/large-amount-of-records-brings-error/118823 "2007-10-31T12:05:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vapor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5e9695/32.png) [@vapor](https://www.ruby-forum.com/u/vapor)\
**Post date:** [October 31, 2007, 12:05pm UTC](https://www.ruby-forum.com/t/large-amount-of-records-brings-error/118823/1 "2007-10-31T12:05:38Z")

</div>

I have a page where about 500 records are displayed, or should be  
displayed but I have observed that when I limit records around 50 only,  
servers start getting hiccups and showing message that ‘Something went  
wrong’ and blah blah. But when I am limiting records to 30, it works  
smoothly.

Please tell me what to do. Do I need a large bucked (data type) to put  
records in? Or do I need to modify something at server side?

I am using Mongrel.

Thanks

---

<div class="post-metadata">

**Author:** ![vapor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5e9695/32.png) [@vapor](https://www.ruby-forum.com/u/vapor)\
**Post date:** [October 31, 2007, 1:02pm UTC](https://www.ruby-forum.com/t/large-amount-of-records-brings-error/118823/2 "2007-10-31T13:02:40Z")

</div>

Hi Vapor

May I suggest that you look at ActiveScaffold.  
Using AS, I am displaying for one table with 40,000 records displaying  
15 records (configurable) per page speedily and with no issues.

CCH

> **[Rails... Rails... Rails](http://cch4rails.blogspot.com)**
>
> Chee Chong Hwa aka CCH, a Malaysian Chief Software Architect blogs on his experiences with Ruby on Rail running on Win2003 Server+Apache 2.26 environment since 2007. Flirted briefly with Ubuntu 9.04 in 2009. Since January 2017, now using RubyMine...

On Oct 31, 7:05 pm, “Vapor …” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![vapor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5e9695/32.png) [@vapor](https://www.ruby-forum.com/u/vapor)\
**Post date:** [October 31, 2007, 1:09pm UTC](https://www.ruby-forum.com/t/large-amount-of-records-brings-error/118823/3 "2007-10-31T13:09:43Z")

</div>

Yes with with ActiveScaffold, I had two tables,  
one with 48000 records, and another with 175000.  
Both development and production was no problem.

(I was using Oracle 10g and XE for database)

Also be careful of funny fieldnames in your tables that  
happen to be reserved words to your database, I got caught on this  
one.

---

<div class="post-metadata">

**Author:** ![vapor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5e9695/32.png) [@vapor](https://www.ruby-forum.com/u/vapor)\
**Post date:** [October 31, 2007, 2:06pm UTC](https://www.ruby-forum.com/t/large-amount-of-records-brings-error/118823/4 "2007-10-31T14:06:51Z")

</div>

could you guys help me with some code…my current is

in controller …  
@product= Product.find(:all, :conditions =\> [‘owner\_id = ?’,  
session[:user].id], :order =\> ‘time DESC’, :limit =\> 40)

how do I get list in @product variable with ActiveScaffold ?

---

<div class="post-metadata">

**Author:** ![vapor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5e9695/32.png) [@vapor](https://www.ruby-forum.com/u/vapor)\
**Post date:** [October 31, 2007, 4:54pm UTC](https://www.ruby-forum.com/t/large-amount-of-records-brings-error/118823/5 "2007-10-31T16:54:48Z")

</div>

> That ‘blah blah’ probably tells you what went wrong. Without the  
> details of what errors you’re getting it will be hard to suggest a fix.
> 
> Fred

🙂 that blah blah is that ‘we have been notified of this issue’  
and there’s Error 500 Internal Server Error on top

---

<div class="post-metadata">

**Author:** ![vapor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5e9695/32.png) [@vapor](https://www.ruby-forum.com/u/vapor)\
**Post date:** [October 31, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/large-amount-of-records-brings-error/118823/6 "2007-10-31T18:13:17Z")

</div>

On 31 Oct 2007, at 15:54, Vapor … wrote:

> > That ‘blah blah’ probably tells you what went wrong. Without the  
> > details of what errors you’re getting it will be hard to suggest a  
> > fix.
> > 
> > Fred
> 
> 🙂 that blah blah is that ‘we have been notified of this issue’  
> and there’s Error 500 Internal Server Error on top

Fix your configuration so that you get the actual exception been  
through with stack trace etc… and you’ll find problems a lot easier  
to fix (config.action\_controller.consider\_all\_requests\_local in  
development.rb, production.rb etc… do this)

Fred

---

<div class="post-metadata">

**Author:** ![vapor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5e9695/32.png) [@vapor](https://www.ruby-forum.com/u/vapor)\
**Post date:** [November 1, 2007, 6:32am UTC](https://www.ruby-forum.com/t/large-amount-of-records-brings-error/118823/7 "2007-11-01T06:32:35Z")

</div>

> Fix your configuration so that you get the actual exception been  
> through with stack trace etc… and you’ll find problems a lot easier  
> to fix (config.action\_controller.consider\_all\_requests\_local in  
> development.rb, production.rb etc… do this)
> 
> Fred

I checked the logs and it says ‘Lost connection to the MySQL server’.  
But if I limit records to 30, it never happens and works fine. It seems  
that problem is with MySQL when I get slightly large amount of data out  
of it 😕

---

<div class="post-metadata">

**Author:** ![vapor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5e9695/32.png) [@vapor](https://www.ruby-forum.com/u/vapor)\
**Post date:** [October 31, 2007, 3:52pm UTC](https://www.ruby-forum.com/t/large-amount-of-records-brings-error/118823/8 "2007-10-31T15:52:06Z")

</div>

On 31 Oct 2007, at 11:05, Vapor … wrote:

> I have a page where about 500 records are displayed, or should be  
> displayed but I have observed that when I limit records around 50  
> only,  
> servers start getting hiccups and showing message that ‘Something went  
> wrong’ and blah blah. But when I am limiting records to 30, it works  
> smoothly.
> 
> Please tell me what to do. Do I need a large bucked (data type) to put  
> records in? Or do I need to modify something at server side?

That ‘blah blah’ probably tells you what went wrong. Without the  
details of what errors you’re getting it will be hard to suggest a fix.

Fred
