Closed TatyanaBol closed 5 years ago
Hi @TatyanaBol ,
Thank you for letting us know about this issue!
nodejs-cloudant
's retry mechanism is only enabled if you have configured the retry plugin when you are initializing the client. See https://github.com/cloudant/nodejs-cloudant#plugin-configuration for further information.
Can you please confirm that you have enabled the retry plugin? (As it is not enabled by default.)
Also, the 5xx error code clearly indicates this is a server-side issue. Whilst the retries may temporarily enable you to receive a response, it might be worth pursuing your support case a little further.
Donat
@bessbd Thank you for your answer. We didn't have retry plugin in our configuration. How to enable it with default values? Is this code correct?
cloudant = require('@cloudant/cloudant')({ url: dbUrl,
//maxAttempt: 3 by default, no need to set,
plugins: { retry: {} } //all default config parameters
});
Thanks
plugins: [ 'cookieauth', 'retry']
The default cookieauth
plugin is only added if no other plugins are specified, so if you want to keep using that auth you'll need to specify it as well.
@ricellis Thanks! I'll try
@TatyanaBol : it seems the nodejs-cloudant
-related part of this issue is resolved.
I'll close this issue. Please reopen or create another if there is anything else we can do for you.
Bug Description
1. Steps to reproduce and the simplest code sample possible to demonstrate the issue
We have this code:
When we call this code FOR DIFFERENT VIEWS in our application SOMETIMES we get this error :
In IBM Cloud Support Case CS0461614 it was recommended to retry request after this error. But in your documentation I found that retry logic works by default. It means that we got this error response after 3 re-tries. In last 2 days we have 51 hits of this error in our log (with re-tries it's 153 errors) What can be done to prevent this error?
2. What you expected to happen
View query returns results
3. What actually happened
View query returns error
Environment details