[#210] Access denied after some time on my hosting

Migrated from Redmine #210 | Author: Franjo Eric
Status: New | Priority: High, I’m very impatient | Created: 2018-08-04


Hi,
I have pm2 service on digital ocean droplet and API works fine.
After some time I’m just getting

{
“code”: -32600,
“message”: “Access denied”
}

And when I restart service again it’s working, but one particular time.

raw request for this response is in attachment

Please help,
Thank you.

Redmine Admin wrote:

Please note acces token has 30 minutes lifetime and you need to regenerate it

Franjo Eric wrote:

Okay, I did not find that in documentation.

I tried to set interval for 29mins to regenerate new token and add --watch flag on my pm2 service, but again it’s not stable.

Currently my solution is to get new token on every pm2 request but then request/response time is over 5s… to slow.
Is there some best practices with pm2 service and nodejs server for your API?

Thank you