# Error: Core fallback runs in infinite loop with action server

**URL:** <https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154>\
**Category:** Rasa Open Source\
**Created:** [November 19, 2020, 2:21pm UTC](https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154 "2020-11-19T14:21:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbukovy](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mbukovy/32/11347_2.png) [@mbukovy](https://forum.rasa.com/u/mbukovy)\
**Post date:** [November 19, 2020, 2:21pm UTC](https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154/1 "2020-11-19T14:21:59Z")

</div>

Hey,

we’re trying to implement our own action server within php application and getting a strange behavior with core fallback. Let’s have the following setup

- Rasa 2.0
- yaml [Rasa Setup - Pastebin.com](https://pastebin.com/eY1SZqiz) (we tried bigger models with more stories and intents as well, behaves the same)

Now, whenever a `action_core_fallback` is predicted, custom action is being sent to our webhook url (correctly set in endpoints.yml)

The endpoint receives something like this

```auto
(
 'next_action' => 'action_core_fallback',
 'sender_id' => 'test_sender_1',
 'version' => '2.0.6',
 'tracker' => [...],
 'domain' => [...]
)

```

Our webhook then responds with this 200 json

```auto
{
    "events": [
        {
            "event": "bot",
            "text": "fallback text"
        }
    ]
}

```

but it doesn’t really matter, which actions or responses we use, the result is still the same. Rasa correctly receives the json, sends a message `fallback text` to the user `test_sender_1` to our callback channel but then, Rasa starts to keep predicting `action_core_fallback` (see the log at the end). It’s keep hitting our action server up to 10 times, then dies on `Circuit breaker tripped`. The result is that user receives 10 fallback messages in a row.

Expected behavior - Rasa should send the response to the callback channel and start listening for new input. Interesting is, that if an action server doesn’t send any events, Rasa behaves correctly and listens to another input.

Could you please suggest, what’s wrong?

Rasa log

```auto
W:\rasa\rasa2>rasa run --enable-api --log-file out.log -vv
2020-11-19 15:13:03 DEBUG rasa.cli.utils - Parameter 'endpoints' not set. Using default location 'endpoints.yml' instead.
2020-11-19 15:13:03 DEBUG rasa.cli.utils - Parameter 'credentials' not set. Using default location 'credentials.yml' instead.
2020-11-19 15:13:04 DEBUG rasa.core.utils - Available web server routes:
/conversations/<conversation_id:path>/messages POST add_message
/conversations/<conversation_id:path>/tracker/events POST append_events
/webhooks/callback GET callback_webhook.health
/webhooks/callback/webhook POST callback_webhook.webhook
/model/test/intents POST evaluate_intents
/model/test/stories POST evaluate_stories
/conversations/<conversation_id:path>/execute POST execute_action
/domain GET get_domain
/ GET hello
/model PUT load_model
/model/parse POST parse
/conversations/<conversation_id:path>/predict POST predict
/conversations/<conversation_id:path>/tracker/events PUT replace_events
/conversations/<conversation_id:path>/story GET retrieve_story
/conversations/<conversation_id:path>/tracker GET retrieve_tracker
/status GET status
/model/predict POST tracker_predict
/model/train POST train
/conversations/<conversation_id:path>/trigger_intent POST trigger_intent
/model DELETE unload_model
/version GET version
2020-11-19 15:13:04 INFO root - Starting Rasa server on http://localhost:5005
2020-11-19 15:13:04 DEBUG rasa.core.utils - Using the default number of Sanic workers (1).
2020-11-19 15:13:04 DEBUG rasa.model - Extracted model to 'C:\Users\mbuko\AppData\Local\Temp\tmp1_1oe2qa'.
2020-11-19 15:13:05 INFO root - Enabling coroutine debugging. Loop id 2208175704968.
2020-11-19 15:13:05 DEBUG rasa.model - Extracted model to 'C:\Users\mbuko\AppData\Local\Temp\tmpmtibjfl5'.
2020-11-19 15:13:06 DEBUG rasa.utils.tensorflow.models - Loading the model ...
2020-11-19 15:13:06 DEBUG rasa.nlu.classifiers.diet_classifier - Following metrics will be logged during training:
2020-11-19 15:13:06 DEBUG rasa.nlu.classifiers.diet_classifier - t_loss (total loss)
2020-11-19 15:13:06 DEBUG rasa.nlu.classifiers.diet_classifier - i_acc (intent acc)
2020-11-19 15:13:06 DEBUG rasa.nlu.classifiers.diet_classifier - i_loss (intent loss)
2020-11-19 15:13:08 DEBUG rasa.utils.tensorflow.models - Finished loading the model.
2020-11-19 15:13:08 DEBUG rasa.utils.tensorflow.models - Building tensorflow prediction graph...
2020-11-19 15:13:12 DEBUG rasa.utils.tensorflow.models - Finished building tensorflow prediction graph.
2020-11-19 15:13:12 DEBUG rasa.core.tracker_store - Connected to InMemoryTrackerStore.
2020-11-19 15:13:12 DEBUG rasa.core.lock_store - Connected to lock store 'InMemoryLockStore'.
2020-11-19 15:13:12 DEBUG rasa.model - Extracted model to 'C:\Users\mbuko\AppData\Local\Temp\tmpi6xviqw0'.
2020-11-19 15:13:12 DEBUG rasa.utils.tensorflow.models - Loading the model ...
2020-11-19 15:13:13 DEBUG rasa.utils.tensorflow.models - Finished loading the model.
2020-11-19 15:13:13 DEBUG rasa.utils.tensorflow.models - Building tensorflow prediction graph...
2020-11-19 15:13:15 DEBUG rasa.utils.tensorflow.models - Finished building tensorflow prediction graph.
2020-11-19 15:13:15 DEBUG rasa.core.nlg.generator - Instantiated NLG to 'TemplatedNaturalLanguageGenerator'.
2020-11-19 15:13:15 INFO root - Rasa server is up and running.
2020-11-19 15:13:23 DEBUG rasa.core.lock_store - Issuing ticket for conversation 'test_sender_1'.
2020-11-19 15:13:23 DEBUG rasa.core.lock_store - Acquiring lock for conversation 'test_sender_1'.
2020-11-19 15:13:23 DEBUG rasa.core.lock_store - Acquired lock for conversation 'test_sender_1'.
2020-11-19 15:13:23 DEBUG rasa.core.tracker_store - Creating a new tracker for id 'test_sender_1'.
2020-11-19 15:13:23 DEBUG rasa.core.processor - Starting a new session for conversation ID 'test_sender_1'.
2020-11-19 15:13:23 DEBUG rasa.core.processor - Action 'action_session_start' ended with events '[<rasa.shared.core.events.SessionStarted object at 0x0000020225B1B3C8>, <rasa.shared.core.events.ActionExecuted object at 0x0000020225AC8C88>]'.
2020-11-19 15:13:23 DEBUG rasa.core.processor - Received user message 'doesn't work' with intent '{'id': 1905598998369304258, 'name': 'Backend tech', 'confidence': 0.39097222685813904}' and entities '[]'
2020-11-19 15:13:23 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 4 events.
2020-11-19 15:13:23 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:23 DEBUG rasa.core.policies.memoization - There is a memorised next action 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'
2020-11-19 15:13:23 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:23 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:13:23 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_MemoizationPolicy
2020-11-19 15:13:23 DEBUG rasa.core.processor - Predicted next action 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76' with confidence 1.00.
2020-11-19 15:13:23 DEBUG rasa.core.processor - Action 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76' ended with events '[BotUttered('Awesome and more awesome', {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, {"template_name": "utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76"}, 1605795203.9966788)]'.
2020-11-19 15:13:26 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}]
2020-11-19 15:13:26 DEBUG rasa.core.policies.memoization - There is a memorised next action 'action_listen'
2020-11-19 15:13:26 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}]
2020-11-19 15:13:26 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:13:26 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_MemoizationPolicy
2020-11-19 15:13:26 DEBUG rasa.core.processor - Predicted next action 'action_listen' with confidence 1.00.
2020-11-19 15:13:26 DEBUG rasa.core.processor - Action 'action_listen' ended with events '[]'.
2020-11-19 15:13:26 DEBUG rasa.core.lock_store - Deleted lock for conversation 'test_sender_1'.
2020-11-19 15:13:48 DEBUG rasa.core.lock_store - Issuing ticket for conversation 'test_sender_1'.
2020-11-19 15:13:48 DEBUG rasa.core.lock_store - Acquiring lock for conversation 'test_sender_1'.
2020-11-19 15:13:48 DEBUG rasa.core.lock_store - Acquired lock for conversation 'test_sender_1'.
2020-11-19 15:13:48 DEBUG rasa.core.tracker_store - Recreating tracker for id 'test_sender_1'

#
# NOW I'VE SEND A MESSAGE TO PREDICT A FALLBACK ACTION
#

2020-11-19 15:13:48 DEBUG rasa.core.processor - Received user message 'now fallback' with intent '{'id': -2734617851034171858, 'name': 'What are you', 'confidence': 0.8146608471870422}' and entities '[]'
2020-11-19 15:13:48 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 8 events.
2020-11-19 15:13:48 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:48 DEBUG rasa.core.policies.memoization - There is no memorised next action
2020-11-19 15:13:48 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:48 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:13:48 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy
2020-11-19 15:13:48 DEBUG rasa.core.processor - Predicted next action 'action_core_fallback' with confidence 0.20.
2020-11-19 15:13:48 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_core_fallback'.
2020-11-19 15:13:49 DEBUG rasa.core.processor - Action 'action_core_fallback' ended with events '[BotUttered('fallback', {}, {}, 1605795229.6483705), <rasa.shared.core.events.ActionReverted object at 0x00000202253E7FC8>]'.
2020-11-19 15:13:51 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:51 DEBUG rasa.core.policies.memoization - There is no memorised next action
2020-11-19 15:13:51 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:51 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:13:51 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy
2020-11-19 15:13:51 DEBUG rasa.core.processor - Predicted next action 'action_core_fallback' with confidence 0.20.
2020-11-19 15:13:51 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_core_fallback'.
2020-11-19 15:13:51 DEBUG rasa.core.processor - Action 'action_core_fallback' ended with events '[BotUttered('fallback', {}, {}, 1605795231.7038443), <rasa.shared.core.events.ActionReverted object at 0x00000202262F0DC8>]'.
2020-11-19 15:13:53 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:53 DEBUG rasa.core.policies.memoization - There is no memorised next action
2020-11-19 15:13:53 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:53 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:13:53 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy
2020-11-19 15:13:53 DEBUG rasa.core.processor - Predicted next action 'action_core_fallback' with confidence 0.20.
2020-11-19 15:13:53 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_core_fallback'.
2020-11-19 15:13:53 DEBUG rasa.core.processor - Action 'action_core_fallback' ended with events '[BotUttered('fallback', {}, {}, 1605795233.7801652), <rasa.shared.core.events.ActionReverted object at 0x0000020222ADBBC8>]'.
2020-11-19 15:13:55 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:55 DEBUG rasa.core.policies.memoization - There is no memorised next action
2020-11-19 15:13:55 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:55 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:13:55 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy
2020-11-19 15:13:55 DEBUG rasa.core.processor - Predicted next action 'action_core_fallback' with confidence 0.20.
2020-11-19 15:13:55 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_core_fallback'.
2020-11-19 15:13:56 DEBUG rasa.core.processor - Action 'action_core_fallback' ended with events '[BotUttered('fallback', {}, {}, 1605795236.154833), <rasa.shared.core.events.ActionReverted object at 0x0000020222AB6488>]'.
2020-11-19 15:13:57 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:57 DEBUG rasa.core.policies.memoization - There is no memorised next action
2020-11-19 15:13:57 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:57 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:13:57 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy
2020-11-19 15:13:57 DEBUG rasa.core.processor - Predicted next action 'action_core_fallback' with confidence 0.20.
2020-11-19 15:13:57 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_core_fallback'.
2020-11-19 15:13:58 DEBUG rasa.core.processor - Action 'action_core_fallback' ended with events '[BotUttered('fallback', {}, {}, 1605795238.0718741), <rasa.shared.core.events.ActionReverted object at 0x00000202261ABF88>]'.
2020-11-19 15:13:59 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:59 DEBUG rasa.core.policies.memoization - There is no memorised next action
2020-11-19 15:13:59 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:13:59 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:13:59 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy
2020-11-19 15:13:59 DEBUG rasa.core.processor - Predicted next action 'action_core_fallback' with confidence 0.20.
2020-11-19 15:13:59 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_core_fallback'.
2020-11-19 15:14:00 DEBUG rasa.core.processor - Action 'action_core_fallback' ended with events '[BotUttered('fallback', {}, {}, 1605795240.163361), <rasa.shared.core.events.ActionReverted object at 0x0000020222B40EC8>]'.
2020-11-19 15:14:01 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:14:01 DEBUG rasa.core.policies.memoization - There is no memorised next action
2020-11-19 15:14:01 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:14:01 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:14:01 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy
2020-11-19 15:14:01 DEBUG rasa.core.processor - Predicted next action 'action_core_fallback' with confidence 0.20.
2020-11-19 15:14:01 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_core_fallback'.
2020-11-19 15:14:02 DEBUG rasa.core.processor - Action 'action_core_fallback' ended with events '[BotUttered('fallback', {}, {}, 1605795242.5156264), <rasa.shared.core.events.ActionReverted object at 0x0000020222B40B08>]'.
2020-11-19 15:14:04 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:14:04 DEBUG rasa.core.policies.memoization - There is no memorised next action
2020-11-19 15:14:04 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:14:04 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:14:04 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy
2020-11-19 15:14:04 DEBUG rasa.core.processor - Predicted next action 'action_core_fallback' with confidence 0.20.
2020-11-19 15:14:04 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_core_fallback'.
2020-11-19 15:14:05 DEBUG rasa.core.processor - Action 'action_core_fallback' ended with events '[BotUttered('fallback', {}, {}, 1605795245.0051792), <rasa.shared.core.events.ActionReverted object at 0x0000020222A7FD88>]'.
2020-11-19 15:14:06 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:14:06 DEBUG rasa.core.policies.memoization - There is no memorised next action
2020-11-19 15:14:06 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:14:06 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:14:06 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy
2020-11-19 15:14:06 DEBUG rasa.core.processor - Predicted next action 'action_core_fallback' with confidence 0.20.
2020-11-19 15:14:06 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_core_fallback'.
2020-11-19 15:14:08 DEBUG rasa.core.processor - Action 'action_core_fallback' ended with events '[BotUttered('fallback', {}, {}, 1605795248.0147989), <rasa.shared.core.events.ActionReverted object at 0x0000020222A979C8>]'.
2020-11-19 15:14:09 DEBUG rasa.core.policies.memoization - Current tracker state [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:14:09 DEBUG rasa.core.policies.memoization - There is no memorised next action
2020-11-19 15:14:09 DEBUG rasa.core.policies.rule_policy - Current tracker state: [{}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'action_listen'}}, {'user': {'intent': 'Backend tech'}, 'prev_action': {'action_name': 'utter_b8a7830281b4122a3b6d24776857e0bd1dc7ce76'}}, {'user': {'intent': 'What are you'}, 'prev_action': {'action_name': 'action_listen'}}]
2020-11-19 15:14:09 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2020-11-19 15:14:09 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy
2020-11-19 15:14:09 DEBUG rasa.core.processor - Predicted next action 'action_core_fallback' with confidence 0.20.
2020-11-19 15:14:09 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_core_fallback'.
2020-11-19 15:14:10 DEBUG rasa.core.processor - Action 'action_core_fallback' ended with events '[BotUttered('fallback', {}, {}, 1605795250.3087485), <rasa.shared.core.events.ActionReverted object at 0x0000020222A97C88>]'.
2020-11-19 15:14:11 WARNING rasa.core.processor - Circuit breaker tripped. Stopped predicting more actions for sender 'test_sender_1'.
2020-11-19 15:14:11 DEBUG rasa.core.lock_store - Deleted lock for conversation 'test_sender_1'.

```

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [November 20, 2020, 1:52pm UTC](https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154/2 "2020-11-20T13:52:14Z")

</div>

hey there @mbukovy, interesting problem! I see that the infinite predictions are all being made by the RulePolicy. Can you post your rules here? Maybe you have some rule that applies with `wait_for_user_input: false` or something like that, which is always applicable?

> Interesting is, that if an action server doesn’t send any events, Rasa behaves correctly and listens to another input.

Sounds like that bot event is part of the rule that’s always applicable, and therefore if it doesn’t get sent, the rule no longer applies…

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [November 20, 2020, 1:54pm UTC](https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154/3 "2020-11-20T13:54:44Z")

</div>

Oh! Actually, i’m now noticing that it’s predicting with RulePolicy although there is no applicable rule. Do you have the `TEDPolicy` in your ensemble, or just rules and Memoization? Seems like RulePolicy (higher prio over memo) is defaulting to the last prediction it made because there’s no other policy to make an educated guess? 🤔

---

<div class="post-metadata">

**Author:** ![mbukovy](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mbukovy/32/11347_2.png) [@mbukovy](https://forum.rasa.com/u/mbukovy)\
**Post date:** [November 20, 2020, 2:47pm UTC](https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154/4 "2020-11-20T14:47:20Z")

</div>

Hey @erohmensing thank you for reply 🙂

There is my yaml setup on pastebin in the first post (it’s not well visible though) [https://pastebin.com/eY1SZqiz](https://pastebin.com/eY1SZqiz) You can see there all the rules and policies and yes, there is also TED policy.

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [November 20, 2020, 2:54pm UTC](https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154/5 "2020-11-20T14:54:09Z")

</div>

Ah thanks for the clarification, i missed that you’d shared it before 🙂 I think this is the problem:

> - `enable_fallback_prediction` - If `True` , `core_fallback_action_name` is predicted in case no rule matched.

Seems like the exact behavior you’re seeing!

---

<div class="post-metadata">

**Author:** ![mbukovy](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mbukovy/32/11347_2.png) [@mbukovy](https://forum.rasa.com/u/mbukovy)\
**Post date:** [November 24, 2020, 1:05pm UTC](https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154/6 "2020-11-24T13:05:29Z")

</div>

@erohmensing I’ve been testing it a little bit but removing enable\_fallback\_prediction didn’t help. Still doing the same loop ☹

---

<div class="post-metadata">

**Author:** ![wbrinki](https://avatars.discourse-cdn.com/v4/letter/w/54ee81/32.png) [@wbrinki](https://forum.rasa.com/u/wbrinki)\
**Post date:** [January 20, 2022, 1:09pm UTC](https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154/7 "2022-01-20T13:09:18Z")

</div>

I am facing the same issue…have you found a solution?

---

<div class="post-metadata">

**Author:** ![TimW](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@TimW](https://forum.rasa.com/u/TimW)\
**Post date:** [March 7, 2022, 7:02am UTC](https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154/8 "2022-03-07T07:02:48Z")

</div>

I am also facing this issue… Is there any solution yet?

---

<div class="post-metadata">

**Author:** ![arthurTemporim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/arthurtemporim/32/607_2.png) [@arthurTemporim](https://forum.rasa.com/u/arthurTemporim)\
**Post date:** [January 6, 2023, 8:06pm UTC](https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154/9 "2023-01-06T20:06:09Z")

</div>

I think the issue is that the chatbot predicts `fallback`, and run it, but when looking for what to do next, there is no example in `stories` or `rules`, so it predicts **again** `fallback` and stays in this loop. My clue to this is the chatbot is always running `core_fallback`.

One thing that can help is creating an `action_default_fallback` and using the:

```auto
return [UserUtteranceReverted()]

```

Like the [documentation](https://rasa.com/docs/rasa/fallback-handoff/#3-customizing-the-default-action-optional).

This way, the wrong behavior will be **“erased”** from the tracker, and the chatbot can predict correctly the solution.

---

<div class="post-metadata">

**Author:** ![mbukovy](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mbukovy/32/11347_2.png) [@mbukovy](https://forum.rasa.com/u/mbukovy)\
**Post date:** [February 8, 2023, 3:12pm UTC](https://forum.rasa.com/t/error-core-fallback-runs-in-infinite-loop-with-action-server/37154/10 "2023-02-08T15:12:09Z")

</div>

Just FYI: We have solved this by adding followup action\_listen at the end of each action\_fallback response

```auto
[
    ...all our response actions,
    {
        "event": 'followup',
        "name": 'action_listen',
    }
]

```
