duplicate key value violates unique constraint "pk_jhi_persistent_audit_event"
Closed this issue · 1 comments
mraible commented
Login and registration fail every-so-often and it seems to be caused by the sequence keys in some of the auditing tables:
2017-12-19T02:44:25.564551+00:00 app[web.1]: 2017-12-19 02:44:25.564 WARN 4 --- [ XNIO-2 task-26] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 23505
2017-12-19T02:44:25.564734+00:00 app[web.1]: 2017-12-19 02:44:25.564 ERROR 4 --- [ XNIO-2 task-26] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: duplicate key value violates unique constraint "pk_jhi_persistent_audit_event"
2017-12-19T02:44:25.564737+00:00 app[web.1]: Detail: Key (event_id)=(42094) already exists.
2017-12-19T02:44:25.565215+00:00 app[web.1]: 2017-12-19 02:44:25.565 ERROR 4 --- [ XNIO-2 task-26] o.h.i.ExceptionMapperStandardImpl : HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute statement]
2017-12-19T02:44:25.567741+00:00 app[web.1]: 2017-12-19 02:44:25.567 ERROR 4 --- [ XNIO-2 task-26] o.j.h.w.rest.errors.ExceptionTranslator : An unexpected error occurred: could not execute statement; SQL [n/a]; constraint [pk_jhi_persistent_audit_event]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
2017-12-19T02:44:27.820781+00:00 heroku[web.1]: Process running mem=523M(102.1%)
2017-12-19T02:44:27.820897+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-12-19T02:44:25.571359+00:00 heroku[router]: at=info method=POST path="/api/authenticate" host=www.21-points.com request_id=b54f7527-7479-42ee-acaa-d6794567c118 fwd="75.171.150.21" dyno=web.1 connect=0ms service=156ms status=500 bytes=550 protocol=https
Question posted to Stack Overflow on December 19, 2017.
mraible commented
After deploying 5.0.2, this issue still happens.