in reply to Re^2: Mojolicious and connection to a database
in thread Mojolicious and connection to a database
What if your database server crashes/shuts down/restarts after you run the plugin() to connect to it? %connections flag will not tell you that. In general, one can ping() prior to, or eval() on each db operation and catch the error if any. So perhaps convert this flag to a sub which pings the db-handle you think you have and return the result. See check if DBI is still connected.
|
|---|