Hello Matt,

On Wed, May 21, 2008 at 10:46 PM, Matt Smith <[EMAIL PROTECTED]> wrote:
>
> We have a system that is behaving somewhat abnormally or better yet
> unexpectedly.  We are using the rufus-scheduler to schedule tasks
> within a rails application.  These tasks each interact with
> ActiveRecord going against Postgres.  We see two things.  One is
> Postgres runs out of memory and two sometimes the inserts get mixed
> up, i.e.  one insert to table A actually tries the insert to table B.

What's the name of your ActiveRecord based class and what are the
names of table A and B ?


> I am thinking this is do to each task running in a separate thread but
> utilizing a shared memory when it comes to ActiveRecord.  Does this
> make sense to you and have you experienced this before?

I haven't experienced that before. Your description of the "mixed up"
problem is really puzzling.

Have you considered using a Mutex ? Have you also checked the doc of
ActiveRecord::Base.allow_concurrency ?
http://github.com/rails/rails/tree/master/activerecord/lib/active_record/base.rb#L426-431


> Not sure about the out of memory error, but the crossing of inserts
> seems to be thread related.

Do you have a trace for this out of memory error ? Maybe there is
something to google about it.


Best regards,

-- 
John Mettraux - http://jmettraux.wordpress.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenWFEru users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to