Comment 6 for bug 943031

Revision history for this message
Rafael Durán Castañeda (rafadurancastaneda) wrote :

Since it seems nobody is working so I will do it myself. I think two possible approach:
- Wrap DB calls and catch the error, retrying when we detect MySQL has gone away error. In addition it might be useful wait some time before retrying since in some cases, e.g.: server reboot, MySQL might not be available intermediately but after some time, so it can be worthy adding a flag how many seconds before re-trying.

-DB pool and suitable 'recycle' value should work too on long idle connections, but I'm not sure if this would fix the case where MySQL is rebooted too. In this case, it might be worthy too adding a flag, so DB pool class is configurable.

For now, I will borrow some code from Nova for wrapping DB calls since this can fix all situations and has some extra advantages. Any thought about this?