Hi John,

ActiveRecord::Base.allow_concurrency = true

That did the trick.  We had multiple jobs/threads using ActiveRecord.
Without this setting we saw many errors.  Thanks for the tip.

Also, what are your thoughts on http://www.infoq.com/news/2008/05/wfxml-r
?

Thanks,

Matt

On May 21, 2:46 pm, Matt Smith <[EMAIL PROTECTED]> wrote:
> Hi John,
>
> I will reply with more detail this evening.
>
> Thanks,
>
> Matt
>
> On May 21, 9:04 am, "John Mettraux" <[EMAIL PROTECTED]> wrote:
>
> > 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_rec...
>
> > > 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