Richard Williams
2006-Feb-20 20:34 UTC
[Rails] Interrupted query causes "Rails application failed to start properly" error
Given a "find" screen that hooks to controller that does an sql find. (this is a mysql db). Lets say you have a table with several thousand rows and the find that you do will return a result containing every row in the db. I.e. it takes 15 seconds or longer. When I do this find and then click the "stop" button in my browser to interrupt the query, then soon after try any other page of the app I get the "Rails application failed to start properly" error after what seems like enough time for the prior find to finally complete. I think what I''m seeing is that if you "stop" the browser, the stop is not conveyed into the application and is not stopping the database query that was launched causing the app to wait on the completion of the query. Is this possible? Known problem? How do you prevent this behavior? -- Posted with http://DevLists.com. Sign up and save your time!
Robert Evans
2006-Feb-20 21:44 UTC
[Rails] Interrupted query causes "Rails application failed to start properly" error
Not sure if it is related, but I was getting that same exact message but because I was running under FastCGI and I had puts statments that were getting evaluated. FastCGI receives the puts as the output stream to be rendered to the browser, it doesn''t match what it expects so it reports that Rails died. Perhaps your stop causes an error message to print that makes FastCGi confused? Bob Evans On Feb 20, 2006, at 12:34 PM, Richard Williams wrote:> Given a "find" screen that hooks to controller that does an sql find. > (this is a mysql db). Lets say you have a table with several > thousand > rows and the find that you do will return a result containing every > row > in the db. I.e. it takes 15 seconds or longer. > > When I do this find and then click the "stop" button in my browser to > interrupt the query, then soon after try any other page of the app > I get > the "Rails application failed to start properly" error after what > seems > like enough time for the prior find to finally complete. > > I think what I''m seeing is that if you "stop" the browser, the stop is > not conveyed into the application and is not stopping the database > query > that was launched causing the app to wait on the completion of the > query. > > Is this possible? Known problem? > > How do you prevent this behavior? > > > > -- > Posted with http://DevLists.com. Sign up and save your time! > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Ben Munat
2006-Feb-21 04:17 UTC
[Rails] Interrupted query causes "Rails application failed to start properly" error
I don''t know what''s going on with the rails error, but your brower stop button doesn''t send anything to the app... it just stops the browser from waiting for the response. Welcome to the wonderful of web programming! b PS: Whe you have a long query like that you could return a "processing your request" progess page that has a refresh header to have it poll the server every few seconds. You could then put a "cancel query" link on there, that tells rails to canel the query. Of course, you''d still need to figure out how to tell the db to cancel the query.... Richard Williams wrote:> Given a "find" screen that hooks to controller that does an sql find. > (this is a mysql db). Lets say you have a table with several thousand > rows and the find that you do will return a result containing every row > in the db. I.e. it takes 15 seconds or longer. > > When I do this find and then click the "stop" button in my browser to > interrupt the query, then soon after try any other page of the app I get > the "Rails application failed to start properly" error after what seems > like enough time for the prior find to finally complete. > > I think what I''m seeing is that if you "stop" the browser, the stop is > not conveyed into the application and is not stopping the database query > that was launched causing the app to wait on the completion of the query. > > Is this possible? Known problem? > > How do you prevent this behavior? > > >
Maybe Matching Threads
- Unable to start rail application at localhost
- Apache Takes 10mins to Reboot
- About acessing Virtual manchine with realVNC
- Application error Rails application failed to start properly"
- Re: "Rails application failed to start properly" happens on Apache 2 + fcgi