问题
After few transaction while using Dialogflow APIs, DEADLINE_EXCEEDED: Deadline Exceeded
error is coming and after that I always need to restart the service, then again it starts working for a while. Not getting any relevant answers even after trying lots of blogs.
Using node package: dialogflow and dialogflow standard edition (Free Version)
Tried with various agent of Dialogflow, but not getting the response.
Error: 4 DEADLINE_EXCEEDED: Deadline Exceeded at Object.exports.createStatusError (/srv/node_modules/grpc/src/common.js:87:15) at Object.onReceiveStatus (/srv/node_modules/grpc/src/client_interceptors.js:1188:28) at InterceptingListener._callNext (/srv/node_modules/grpc/src/client_interceptors.js:564:42) at InterceptingListener.onReceiveStatus (/srv/node_modules/grpc/src/client_interceptors.js:614:8) at callback (/srv/node_modules/grpc/src/client_interceptors.js:841:24) code: 4, metadata: Metadata { _internal_repr: {} }, details: 'Deadline Exceeded' }
While using dialogflow
node package, and here using
const sessionClient = new dialogflow.SessionsClient();
to detect intent not getting the result as detected intent after hitting query for a phrase.
回答1:
The DEADLINE_EXCEEDED error is triggered when the webhook call exceeds the maximum wait time.
As stated on DialogFlow fulfillment documentation:
The response must occur within 10 seconds for Actions on Google applications or 5 seconds for all other applications, otherwise the request will time out.
If you want, on dialogflow, you can set a pre-defined message that is sent when the fulfillment request exceeds the available time.
来源:https://stackoverflow.com/questions/56052839/error-4-deadline-exceeded-deadline-exceeded