codebrag icon indicating copy to clipboard operation
codebrag copied to clipboard

Codebrang needs a restart every now and again

Open schrepfler opened this issue 9 years ago • 3 comments

I've noticed codebrag needs a restart as the frontend dissapears after some time. Has anyone noticed this? Couple of things I've noticed on the logs:

  1. occasionally the git repo is not availible
Service - Cannot pull changes from upstream
org.eclipse.jgit.api.errors.TransportException: [email protected]: Session.connect: java.net.SocketException: C
onnection reset
        at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:137) ~[codebrag.jar:2.3.1]
  1. Noticed these exceptions in the logs when pressing "Mark commit as reviewed"
14:03:53.201 [qtp451189693-49] ERROR c.s.codebrag.rest.CommitsServlet - Something went wrong
org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY_KEY_26 ON PUBLIC.""reviewed_commits""(""user_id"", ""sha"", ""repo_name"") VALUES ( /* key:30 */ '54bcc8dce4b042c63284e4ff', 'f366990e1eddf12b1bdd1b6425258108f6d0e8f3', null, 'wh-debit-card-batch')"; SQL statement:
INSERT INTO "reviewed_commits" ("sha","user_id","repo_name","review_date") VALUES (?,?,?,?) [23505-175]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:332) ~[codebrag.jar:2.3.1]

schrepfler avatar May 29 '15 13:05 schrepfler

Yes, we experience the same thing. CB still sends the email notifications but the UI is "down". A restart and it works great again.

On Fri, May 29, 2015 at 8:17 AM, Srepfler Srdan [email protected] wrote:

I've noticed codebrag needs a restart as the frontend dissapears after some time. Has anyone noticed this? Couple of things I've noticed on the logs:

  1. occasionally the git repo is not availible

Service - Cannot pull changes from upstream org.eclipse.jgit.api.errors.TransportException: [email protected]: Session.connect: java.net.SocketException: C onnection reset at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:137) ~[codebrag.jar:2.3.1]

  1. Noticed these exceptions in the logs when pressing "Mark commit as reviewed"

14:03:53.201 [qtp451189693-49] ERROR c.s.codebrag.rest.CommitsServlet - Something went wrong org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY_KEY_26 ON PUBLIC.""reviewed_commits""(""user_id"", ""sha"", ""repo_name"") VALUES ( /* key:30 */ '54bcc8dce4b042c63284e4ff', 'f366990e1eddf12b1bdd1b6425258108f6d0e8f3', null, 'wh-debit-card-batch')"; SQL statement: INSERT INTO "reviewed_commits" ("sha","user_id","repo_name","review_date") VALUES (?,?,?,?) [23505-175] at org.h2.message.DbException.getJdbcSQLException(DbException.java:332) ~[codebrag.jar:2.3.1]

— Reply to this email directly or view it on GitHub https://github.com/softwaremill/codebrag/issues/39.

jeffjensen avatar May 29 '15 14:05 jeffjensen

Weird, we haven't experienced it on our servers so far. @schrepfler, do you think these logs entries have something to do with the main issue or is it just "by the way" thing?

mostr avatar May 29 '15 17:05 mostr

Not sure if it's related in any way. It seems something related with the presentation layer as the backend continues sending emails with the commits.

schrepfler avatar May 29 '15 18:05 schrepfler