Transitime / core

Transitime 0.1 (beta) is an open source project created and managed by Swiftly, Inc. to help transit agencies generate more accurate and reliable real-time arrival information for passengers. This version of the code is an early beta release and should not be used for production implementations. Please reach out to Swiftly at contact@goswift.ly for the most up-to-date software.
https://goswift.ly/transitime
GNU General Public License v3.0
62 stars 77 forks source link

ERROR: current transaction is aborted, commands ignored until end of transaction block #23

Closed scrudden closed 9 years ago

scrudden commented 9 years ago

Whenever I get a database jdbc error/exception all subsequent calls to the database result in a

"ERROR: current transaction is aborted, commands ignored until end of transaction block"

For example I got an exception on writing a MonitoringEvent where the message length was greater than 512 characters, which then results in the above error when writing subsequent AVL reports to the database.

I think this is specific to Postgres.

skibu commented 9 years ago

I tried this out with the changed code and could not cause the problem to occur anymore. Both MonitoringEvent was fixed to handle really long messages, plus DataDbLogger was fixed to rollback transactions if there is an exception.