How do I prevent the Azure cognitive search service from becoming cold after a period of no load?
I use QnaMaker in chatbots (Managed QnA Maker Service version).
QnaMaker seems to idle after not being used for a while. The first query takes 7 seconds to complete. Every query after the first one completes within a second.
The chatbots themselves (developed with Microsoft Bot Framework V4 nodejs) show no latency. Even after not being used for a while (thanks to the "Always on" feature in the bots appservice)
I use the stable GA version of QnaMaker and the managed version (in preview). In the first version, the appservice for QnaMaker has the feature "Always On" enabled. For the preview version, there is no appservice I can check.
Chatbotcode initialization QnaMaker
const { QnAMaker } = require('botbuilder-ai');
const endpoint_fr = {
knowledgeBaseId: process.env.QnAKbId_fr,
endpointKey: process.env.QnaEndpointKey_fr,
host: process.env.QnaHostName_fr
};
try {
this.qnaMaker_fr = new QnAMaker(endpoint_fr, {});
} catch (err) {
console.warn(`QnAMaker Exception: ${err} Check your QnAMaker configuration in .env`);
}
the actual call to QnAMaker service
qnaResults = await this.qnaMaker_fr.getAnswers(stepContext.context);
The QnAMaker stack is linked to a Azure Search-resource. The one I am using has pricing tier Basic (1 replica, partition and search unit) 10 indexes are in use (15 are allowed) to store 7 knowledge bases. location is West Europe.
How do I prevent the Azure cognitive search service from becoming cold after a period of no load?
[update] Did some more digging and came to the conclusion that this cold start only occured for knowledge bases in the (preview) managed service. I decided to move all KB's to the stable version and the cold start problems stopped. This could also have to do with the fact that I am in Western Europe and the managed version is available in Northern Europe only
I moved all my QNA knowledge bases back to the stable version. The managed version seemed to cause the cold start. Not sure why but my bots are performing again.