Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EveryTime, API is crushed #655

Open
username1565 opened this issue Feb 14, 2021 · 3 comments
Open

EveryTime, API is crushed #655

username1565 opened this issue Feb 14, 2021 · 3 comments

Comments

@username1565
Copy link

Everytime, by some timeout, API is crushed, and restarted then.
In console of server-backend, I see this:

2021-02-15 01:22:39 [api] Stat collection broadcastLiveStats: 8 ms 

ReplyError: EXECABORT Transaction discarded because of previous errors. 
at parseError (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:179:12) 
at parseType (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:302:14) 


ReplyError: EXECABORT Transaction discarded because of previous errors. 
at parseError (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:179:12) 
at parseType (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:302:14) 


ReplyError: EXECABORT Transaction discarded because of previous errors. 
at parseError (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:179:12) 
at parseType (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:302:14) 


ReplyError: EXECABORT Transaction discarded because of previous errors. 
at parseError (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:179:12) 
at parseType (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:302:14) 


ReplyError: EXECABORT Transaction discarded because of previous errors. 
at parseError (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:179:12) 
at parseType (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:302:14) 


ReplyError: EXECABORT Transaction discarded because of previous errors. 
at parseError (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:179:12) 
at parseType (/cryptonote-nodejs-pool/node_modules/redis-parser/lib/parser.js:302:14) 

2021-02-15 01:22:44 [master] API died, spawning replacement... 
(node:23359) ExperimentalWarning: queueMicrotask() is experimental.

What does this mean?

@username1565
Copy link
Author

username1565 commented Feb 15, 2021

This something with redis, because after google this:
ReplyError: EXECABORT Transaction discarded because of previous errors.
And according this: https://stackoverflow.com/a/54063543

This can also happen due to empty multi command.
running redis-cli monitor I saw

1546789398.881549 [0 the-ip] "multi"
1546789398.881575 [0 the-ip] "exec"

Before executing multi, make sure that you have at least 1 command to execute on the transaction.

Somewhere, after try to get status, from redis, redis-monitor show twice:

1546789398.881549 [0 the-ip] "multi"
1546789398.881575 [0 the-ip] "exec"
1546789398.881549 [0 the-ip] "multi"
1546789398.881575 [0 the-ip] "exec"

and then, api crushed, and restarting again.

Anyone know, how to fix this? I see some functions by keyword multi, here: https://github.com/dvandal/cryptonote-nodejs-pool/search?p=2&q=multi&type=

@username1565
Copy link
Author

I found an error, related with this issue, and found this, at this line:

lastResponse: JSON.stringify(error ? error : response)

Some bullshit there, and this value is undefined.
I just changed this to:

lastResponse: JSON.stringify(error ? error : response) || 'ok' //it's "undefined"!

After this, changes, API have no crushes every time, after some timeout.

This do tryes to write undefined, into redis-server, and API got crushes every time, because of this,
and restarting again and again, and again, and again...

P.S.:
Why this value is undefined, I do not know,
but by adding the line:

console.warn(redisCommands, error, response); //before next line
redisClient.multi(redisCommands).exec();

I see, this undefined, after try to getStatus from wallet, while the daemon have some response, there, and this is not undefined.
Maybe, need to use some another, different API-calls, for different wallet-API.

username1565 added a commit to username1565/cryptonote-nodejs-pool that referenced this issue Feb 19, 2021
On tryes to update wallet-status, by timeout,
this every time tried to write 'undefined' in redis,
and API crushed every time, then restarted.
Issue: dvandal#655
@username1565
Copy link
Author

username1565 commented Feb 19, 2021

I did try to get status, of wallet, by using wallet-API, and did try to get this, using url http://wallet_API_IP:PORT/status,
and I see in console of wallet API, some message, about X-API-KEY does not exists.

So, maybe, because of this, undefined-value was been returned there, from wallet-api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant