On Nov 29, 4:29 pm, Raghu 2009 <[email protected]> wrote:
> Hi,
>
> When i am forking a process to run a piece of code into independent
> process,
> I usually get the mysql connection error. Does for each of the forked
> process
> i need to establish a new mysql connection.?

That is one of the things you have to be careful about when using
fork, you may end up sharing stuff with the parent process that you
didn't want to share. You can use
ActiveRecord::Base.clear_all_connections! to close existing
connections

Fred
>
> Can any one suggest me on this?
>
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to