In my full sandbox, I have a batchable that reschedules itself in the finish() method. This job has been running for 2+ years; rescheduling itself many times a day

On August 1 at 2231h Pacific, Setup | Apex Jobs reported:

First error: java.lang.IllegalStateException: Phoenix driver closed because server is shutting down 

So, I know there's a certain pride in collecting Seven Dwarfs errors but this is a new one - to the batchable it acts like an uncaught exception

Sadly, this batchable did not implement Database.raisesPlatformEvents so the error took a few days to detect.

Not sure there is an answer to this except to implement Database.raisesPlatformEvents but for those reading this - another thing to worry about, albeit unlikely, in building robust systems.

  • 1
    One assumes this is apache phoenix related and some issue with the connection to the database that leaked through into storing the batchable/schedulable state. I assume you didn't see this more than this once?
    – Phil W
    Aug 6 at 6:16
  • so, far, observed only once
    – cropredy
    Aug 6 at 21:18


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.