Daniel Guermeur
2006-Jan-14 00:34 UTC
[Rails] Forking in Rails => Boom. Mysql has gone away.
Hello, We are running Rails on www.montastic.com (free website monitoring service w/ ajax and RSS feeds) and we are trying to fork a process within a model e.g. and continue the query the model stored data e.g. in model server.rb... Server.count ==> 1111 fork { Server.count } ==> Boom. Mysql has gone away... Is there a way to fork in a way to keep the database connection? -- supercobra@gmail.com
David Felstead
2006-Jan-14 01:17 UTC
[Rails] Forking in Rails => Boom. Mysql has gone away.
You''ll need to establish a new connection in the forked process - that will keep them separate. Cheers, -DF On 1/14/06, Daniel Guermeur <supercobra@gmail.com> wrote:> Hello, > > We are running Rails on www.montastic.com (free website monitoring > service w/ ajax and RSS feeds) and we are trying to fork a process > within a model e.g. and continue the query the model stored data e.g. > > in model server.rb... > > Server.count > ==> 1111 > > fork { > Server.count > } > > ==> Boom. Mysql has gone away... > > Is there a way to fork in a way to keep the database connection? > -- > supercobra@gmail.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Apparently Analagous Threads
- [regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335
- Redirecting user on object.save failures
- SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()
- [regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335
- cygwin1.dll problems when installing packages from source