Menu

#19 MySQL Server has gone away error

open
8
2007-05-02
2007-05-02
No

Because of the odd way that Hobo adds its routes, if the site is inactive for an extended period of time, it will fail. Apparently, ActiveRecord loses its connection with the database, and rails doesn't expect database activity to come from config/routes.rb: but that's exactly what Hobo does.

See http://hobocentral.net/forum/viewtopic.php?t=1056 for a rundown of the issue.

The workaround given there is:
In vendor/plugins/hobo/lib/hobo.rb, add the following above line 133:
ActiveRecord::Base.connection.reconnect! unless
ActiveRecord::Base.connection.active?

I'm hesitant to start mucking with it for a few reasons:

I have my doubts about Hobo as a long term interface for the app. It was great to get something up and flashy flashy in time, but I think the advantages of straight up rhtml far outweigh the rapid development of Hobo in the long term.

For getting the entire UI up in a single night, Hobo was just the ticket. Anywho, a truly RESTful view rewrite would make extensibility a lot better.

Discussion


Log in to post a comment.