Forking a process

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.?

Can any one suggest me on this?

On Nov 29, 4:29pm, 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