blossom-project / blossom

Blossom is a Java framework based on Spring-Boot which enables you to realize your projects quickly and smoothly. It comes with several modules and tools made to ease and speed up your development process.
http://blossom-project.com
Apache License 2.0
21 stars 21 forks source link

Quartz Job stops executing #181

Closed RLejolivet closed 6 years ago

RLejolivet commented 6 years ago

Just had this issue again:

  1. Connexion to database is lost due to unattended-upgrades installing a new MySQL version
2018-07-31 06:25:27.053  WARN 36177 --- [duler_Worker-10] com.zaxxer.hikari.pool.ProxyConnection   : HikariPool-1 - Connection com.mysql.jdbc.JDBC4Connection@6829ad28 marked as broken because of SQLSTATE(08S01), ErrorCode(0)

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
  1. A task throws an exception due to being unable to access the database, and thus terminates instantly
  2. Quartz fails to save that the task finished
2018-07-31 06:25:27.128 ERROR 36177 --- [duler_Worker-10] org.quartz.core.ErrorLogger              : Unable to notify TriggerListener(s) of Job that was executed: (error will be ignored). trigger= DEFAULT.meetingRoomScheduleCronTrigger job= ScheduledJob

org.quartz.SchedulerException: TriggerListener 'GlobalTriggerListener' threw exception: Could not open JPA EntityManager for transaction; nested exception is org.hibernate.TransactionException: JDBC begin transaction failed: 
    at org.quartz.core.QuartzScheduler.notifyTriggerListenersComplete(QuartzScheduler.java:1903) ~[quartz-2.3.0.jar:na]
  1. That particular job is never fired again, even though its cron says it should fire every minute. Other jobs that did not start/finish during the very short period the database server was unavailable were still firing fine.

Note: I am using the default blossom configuration with Quartz data saved in-memory, not entierly sure why a database failure would affect it...