Disable intent insights: REGULAR SERVER CRASH

I seems as the scheduled intent insights cause our server to crash each morning.

Is there a way to disable the calculation of these insights?

Thanks, Micha

2 Likes

this is really important

1 Like

Iā€™m having this same issue, and I need an answer soon. I can no longer continue to use Rasa X if itā€™s going to murder my server every night. Itā€™s killing it to the point that it stops responding to SSH, so I canā€™t even log in to reboot.

2 Likes

I found this documentation that shows how to disable it using the API. Itā€™s a shame thereā€™s not an option to disable it in the GUI.

1 Like

In short, authenticate with the login API to get the access token, then use that token to set the schedule to null with the putInsightConfig API endpoint.

2 Likes

So this is whatā€™s happening to meā€¦ How did you know it was the insights?

And yeah, Rasa X definitely needs to have settings in the GUI.

I finally figured it out this morning. Looking at my AWS monitoring dashboard, I noticed that the CPU usage shot from ~2% to ~70% starting at midnight when the insights were scheduled to start, and continued until I came in and looked at it at 7:30am. The server had started failing to respond at about 1am, so I just assume that insights is the issue. Iā€™ve disabled them now, but I wonā€™t know for sure until tomorrow that it fixed the problem.

1 Like

Oh wow. I deployed on premises and donā€™t have access to this kind of monitoring.

Iā€™ve been having trouble with SSH and even kubectl get pods was too slow sometimes. I hope someone sees this thread and fixes the issue.

Once you check if that was indeed the problem, I suggest you create a new topic with the problem in the title and put a link to it here.

thank you for this info! definitely agree this needs a simpler way of setting this option

Hey @rschuetzler, any updates?

I understand that to disable insights calculation, we should do

curl --request PUT \
  --url <rasa x url>/api/insights/config \
  --header 'Authorization: Bearer <your access token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "schedule": null,
  "cross_validation_folds": <number of cross-validation folds>,
  "calculator_configuration": null
}'

But where can I find my access token? I tried using the one shown in Rasa Xā€™s ā€œUpload Model via APIā€ button, but it says Iā€™m not authorized after I run the curl.


Update: I did this, but still unauthorized.

curl --request PUT \
  --url '<rasa x url>/api/insights/config?api_token=<your access token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "schedule": null,
  "cross_validation_folds": <number of cross-validation folds>,
  "calculator_configuration": null
}'

you get it by using the ā€˜loginā€™ endpoint: send your username & password to log into the rasa x panel and you get an access token back to use as a bearer token for the intents settings request

1 Like

Can you please guide me with commands? Sorry if this is really basic but I never worked with curl :sweat_smile:

And I donā€™t have a username for Rasa X, it just asks me for a password.

Iā€™m trying

curl -X POST -H "Content-Type: application/json"  -d '{username:me, password:<password>}' http://localhost/api/auth

but I get a failure.


Update: Ok, got it. I should have written '{"username":"me", "password":"<password>"}' instead of '{username:me, password:<password>}' .

1 Like

Checked this morning, and disabling insights seems to have kept things under control. My CPU is at its normal idle 2%, and the bot is still responding to requests.

1 Like

same here

1 Like