3060000 database_exception: Database exception when running custom plugin

I am developing an EOS plugin which works as following: The plugin is started alongside nodeos with --plugin command added to the nodeos command. It works as a tcp server listening for client requests on a specified port. The client sends a request which is processed by the plugin and saved in the blockchain with the help of the chain_plugin which i use to call actions from a smart contract created and deployed on the blockchain. The smart contract is responsible for saving the request data in the blockchain. When i run large number of client requests in a for loop (more then 2000 loop iterations) after awhile i get the following error:
error 2018-11-21T10:54:04.027 thread-0 producer_plugin.cpp:1330 schedule_production_ ] Failed to start a pending block, will try again later warn 2018-11-21T10:54:04.077 thread-0 producer_plugin.cpp:1076 start_block ] 3060000 database_exception: Database exception db revision is not on par with head block {"db.revision()":2859,"controller_head_block":2860,"fork_db_head_block":2860} thread-0 controller.cpp:1087 start_block
After this i have to restart the nodeos with --delete-all-blocks. Could someone tell me what is the reason behind this error, because i get it only when i increase the number of client requests, otherwise everything runs normal. Is it a known bug or i need to reconsider something in the way i create the chain transactions?


  • With the help of the people from the EOS Developers Telegram channel and from the people that responded to my issue opened on github, here is the solution: github.com/EOSIO/eos/issues/6380.
    Namely, i had to execute the transactions in the main thread and not in my thread, so i needed to register my transaction methods to the http_plugin and call them using curl http requests.

Sign In or Register to comment.