And now to the issue...we have a long running (several years) 1.8 PWM deployment (with a MySQL 5.5 back end). Suddenly we started observing an issue in our production environment in which any attempted password change including user initiated, helpdesk initiated or self-service reset would produce the following error:
Database Unavailable: If this error occurs repeatedly, please contact your help desk.
I knew that the issue was data related (we have multiple tomcat instances fronted by an LTM and I was able to readily reproduce the error against all of the instances) however it was a challenge to narrow down the cause. I wasn't able to reproduce the error by way of spinning up a new PWM instance that I seeded from an export of our prod database (I still don't understand why I wasn't able to reproduce with this test).
The following corresponding error was being logged by Tomcat when a password change was attempted:
2019-05-13T16:36:59Z, ERROR, rest.RestSetPasswordServer, error during set password REST operation: 5051 ERROR_DB_UNAVAILABLE (5051 ERROR_DB_UNAVAILABLE (put operation failed: Data truncation: Data too long for column 'value' at row 1))
Given the lack of detail in terms of what was being logged in catalina.out, by way of increasing MySQL's logging, I was able to determine that the insert into the USER_AUDIT table was the insert that was producing the error. Upon interrogating the USER_AUDIT table further, I noticed that the table had north of 24,000 rows (I can get the exact count if that level of detail is needed).
I was able to resolve the issue by dropping the USER_AUDIT table and allowing PWM to recreate the table.
I first wanted to post this to the community in case other's run into this issue as again it took a good deal of trial and error in order to understand what was causing the issue as well as some confusion on my part as to why seeding a new instance with the existing database instance didn't produce the error.
Back to the root cause...is there some limitation that we ran into regarding the USER_AUDIT table? 24,000 rows isn't itself a particularly large MySQL table. Is there regular maintenance that we should be performing against either PWM or the database in order to keep the environment proper?
Thanks much for your help.
Best,
Aaron
Thanks