I occurred this Error 3080006: transaction took too long when push my own contract action. the push action cmd had no setting '-X'. It's weird because I pushed the same action with two different accounts,one is ok but another occured frequently.

the -u setting is :https://api.eosnewyork.io Can anyone help me how to analysis this weird question?

Thanks in advance, harlin

  • maybe the other account has less cpu or it attempted to transact during congestion times – confused00 Nov 5 at 16:01
  • thanks, i will monitor the account's cpu – luffy Nov 6 at 3:14
  • today I occurred this error for just one account but it had enough cpu to execute the action. I can see the action is executed from EOSPark, but the cmd returns 'transaction took too long' at the execute moment。 – luffy Nov 6 at 10:00

Abstract

This maybe related to the hardware the blockproducer performing the transaction is using. So I guess you know about the time limit (~ 150ms) which is used to guarantee the high block rates. So staking the right amount of CPU is just a part.

Example

Imagine this scenario with a tx time limit of 1000ms instead of 150ms:

  • BP A is using a CPU with 1 GHz = 1 * 10^9 Hz
  • BP B is using a CPU with 1.5 GHz = 1.5 * 10^9 Hz

If your transaction needs about 1.1 * 10^9 CPU cycles or instructions this will fit in the time slot for BP B, because he can handle 1.5 * 10^9 CPU cycles in 1 second. But for BP A it fail because he can only handle 1 * 10^9 CPU cycles.

Hope this helps.

  • Thanks man. I double checked my contract method and optimized some code about table query which effected the account searching result. And it's worked for me. – luffy Nov 9 at 3:16
  • Glad you solved it. If you are satisfied with this answer please mark it as accepted so others can find it better as well. – TeeAttack42 2 days ago

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.