# Failed to acquire lock for conversation ID

**URL:** <https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963>\
**Category:** Rasa Open Source\
**Created:** [March 15, 2022, 7:16am UTC](https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963 "2022-03-15T07:16:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ck4all89](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ck4all89/32/19953_2.png) [@ck4all89](https://forum.rasa.com/u/ck4all89)\
**Post date:** [March 15, 2022, 7:16am UTC](https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963/1 "2022-03-15T07:16:56Z")

</div>

Hi, when I running rasa(2.8.3), and it gives like…

```auto
2022-03-14 09:55:12 DEBUG rasa.core.lock_store - Failed to acquire lock for conversation ID '62420ae4264b4d42a9aa00eddae52267' because 2 other item(s) for this conversation ID have to be finished processing first. Retrying in 1 seconds ..

```

Please share me your valuable feedback, that how can I fix this issue. Thanks all…

---

<div class="post-metadata">

**Author:** ![anca](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/anca/32/14540_2.png) [@anca](https://forum.rasa.com/u/anca)\
**Post date:** [March 15, 2022, 1:08pm UTC](https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963/2 "2022-03-15T13:08:31Z")

</div>

@ck4all89 Could you please share the command you’re trying to run, and full content of the logs please?

---

<div class="post-metadata">

**Author:** ![ck4all89](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ck4all89/32/19953_2.png) [@ck4all89](https://forum.rasa.com/u/ck4all89)\
**Post date:** [March 15, 2022, 2:19pm UTC](https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963/3 "2022-03-15T14:19:24Z")

</div>

Hi Anca, thanks for reply.

I run these 2 commands-

```auto
**nohup rasa run --ssl-certificate xxxxxxxxxx --ssl-keyfile xxxxxxxxxx -m ./models --endpoints endpoints.yml -p 5005 --credentials credentials.yml --enable-api --cors "*" &**

**nohup python3 -m rasa_sdk --cors "*" --actions actions --ssl-keyfile xxxxxxxxxx --ssl-certificate xxxxxxxxxx &**

```

And below is the issue, that I get in the terminal-

```auto
**rasa.core.lock_store - Issuing ticket for conversation 'b745401fd622428da0cc7394851d73ea'.**
 **2022-03-14 05:45:48 DEBUG rasa.core.lock_store - Acquiring lock for conversation 'b745401fd622428da0cc7394851d73ea'.**
**2022-03-14 05:45:48 DEBUG rasa.core.lock_store - Failed to acquire lock for conversation ID 'b745401fd622428da0cc7394851d73ea' because 1 other item(s) for this conversation ID have to be finished processing first. Retrying in 1 seconds ...**

For "full content of the logs", can you please share me the process that I can get the Rasa logs.

```

Please, let me know if you want anything else…

---

<div class="post-metadata">

**Author:** ![lis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lis/32/18141_2.png) [@lis](https://forum.rasa.com/u/lis)\
**Post date:** [March 15, 2022, 2:31pm UTC](https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963/4 "2022-03-15T14:31:57Z")

</div>

Hey @ck4all89 you can also add --debug to rasa run command to check what exactly is happening behind

---

<div class="post-metadata">

**Author:** ![ck4all89](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ck4all89/32/19953_2.png) [@ck4all89](https://forum.rasa.com/u/ck4all89)\
**Post date:** [March 15, 2022, 3:35pm UTC](https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963/5 "2022-03-15T15:35:41Z")

</div>

Yes, in debug mode (–debug), I run the command, and showing-

```auto
**rasa.core.lock_store - Issuing ticket for conversation ‘b745401fd622428da0cc7394851d73ea’.**  **2022-03-14 05:45:48 DEBUG rasa.core.lock_store - Acquiring lock for conversation ‘b745401fd622428da0cc7394851d73ea’.** **2022-03-14 05:45:48 DEBUG rasa.core.lock_store - Failed to acquire lock for conversation ID ‘b745401fd622428da0cc7394851d73ea’ because 1 other item(s) for this conversation ID have to be finished processing first. Retrying in 1 seconds …**

```

---

<div class="post-metadata">

**Author:** ![lis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lis/32/18141_2.png) [@lis](https://forum.rasa.com/u/lis)\
**Post date:** [March 16, 2022, 6:55am UTC](https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963/6 "2022-03-16T06:55:53Z")

</div>

@ck4all89 are you using inmemory lock store or redis lock store?

---

<div class="post-metadata">

**Author:** ![ck4all89](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ck4all89/32/19953_2.png) [@ck4all89](https://forum.rasa.com/u/ck4all89)\
**Post date:** [March 16, 2022, 8:47am UTC](https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963/7 "2022-03-16T08:47:27Z")

</div>

Hi San,

I used InMemoryLockStore and RedisLockStore, both I had tried.

When I used InMemoryLockStore (as default) it shows in terminal-

2022-03-16 08:45:05 DEBUG rasa.core.actions.forms - Validating extracted slots: {} 2022-03-16 08:45:05 DEBUG rasa.core.actions.action - Calling action endpoint to run action ‘validate\_clientAuthForm’. 2022-03-16 08:45:07 DEBUG rasa.core.lock\_store - Issuing ticket for conversation ‘65e0d841883b47b381dd32d219d0b224’. 2022-03-16 08:45:07 DEBUG rasa.core.lock\_store - Acquiring lock for conversation ‘65e0d841883b47b381dd32d219d0b224’. 2022-03-16 08:45:07 DEBUG rasa.core.lock\_store - Failed to acquire lock for conversation ID ‘65e0d841883b47b381dd32d219d0b224’ because 1 other item(s) for this conversation ID have to be finished processing first. Retrying in 1 seconds …

* * *

And, when I used RedisLockStore to make changes in endpoints.yml file-

 ![a](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/7/5/75eb49012a85701e62369c9efe8c23aa2305dd43.png)

* * *

the terminal shows-

2022-03-16 06:10:31 INFO root - Starting Rasa server on [https://localhost:5005](https://localhost:5005) 2022-03-16 06:10:31 DEBUG rasa.core.utils - Using the default number of Sanic workers (1). 2022-03-16 06:10:31 INFO rasa.model - Loading model models/20220315-110614.tar.gz… 2022-03-16 06:10:32 DEBUG rasa.model - Extracted model to ‘/tmp/tmpgdx7xrtc’. 2022-03-16 06:10:32 DEBUG urllib3.connectionpool - Starting new HTTPS connection (1): [api.segment.io:443](http://api.segment.io:443) 2022-03-16 06:10:33 DEBUG urllib3.connectionpool - [https://api.segment.io:443](https://api.segment.io:443) “POST /v1/track HTTP/1.1” 200 21 2022-03-16 06:10:33 INFO root - Enabling coroutine debugging. Loop id 96780128. 2022-03-16 06:10:33 INFO rasa.model - Loading model models/20220315-110614.tar.gz… 2022-03-16 06:10:35 DEBUG rasa.model - Extracted model to ‘/tmp/tmpfvcjqcpr’. 2022-03-16 06:10:35 DEBUG rasa.utils.tensorflow.models - Loading the model from /tmp/tmpfvcjqcpr/nlu/component\_5\_DIETClassifier.tf\_model with finetune\_mode=False… 2022-03-16 06:10:35 DEBUG rasa.nlu.classifiers.diet\_classifier - Following metrics will be logged during training: 2022-03-16 06:10:35 DEBUG rasa.nlu.classifiers.diet\_classifier - t\_loss (total loss) 2022-03-16 06:10:35 DEBUG rasa.nlu.classifiers.diet\_classifier - i\_acc (intent acc) 2022-03-16 06:10:35 DEBUG rasa.nlu.classifiers.diet\_classifier - i\_loss (intent loss) 2022-03-16 06:10:46 DEBUG rasa.utils.tensorflow.models - Finished loading the model. 2022-03-16 06:10:46 DEBUG rasa.utils.tensorflow.models - Loading the model from /tmp/tmpfvcjqcpr/nlu/component\_7\_ResponseSelector.tf\_model with finetune\_mode=False… 2022-03-16 06:10:46 DEBUG rasa.nlu.selectors.response\_selector - Following metrics will be logged during training: 2022-03-16 06:10:46 DEBUG rasa.nlu.selectors.response\_selector - t\_loss (total loss) 2022-03-16 06:10:46 DEBUG rasa.nlu.selectors.response\_selector - r\_acc (response acc) 2022-03-16 06:10:46 DEBUG rasa.nlu.selectors.response\_selector - r\_loss (response loss) 2022-03-16 06:10:50 INFO rasa\_sdk.endpoint - Starting action endpoint server… 2022-03-16 06:10:50 INFO rasa\_sdk.executor - Registered function for ‘action\_ask\_clientName’. 2022-03-16 06:10:50 INFO rasa\_sdk.executor - Registered function for ‘action\_ask\_clientOrganization’. 2022-03-16 06:10:50 INFO rasa\_sdk.executor - Registered function for ‘action\_ask\_clientEmail’. 2022-03-16 06:10:50 INFO rasa\_sdk.executor - Registered function for ‘action\_ask\_clientPhone’. 2022-03-16 06:10:50 INFO rasa\_sdk.executor - Registered function for ‘action\_clientAuthFormSubmit’. 2022-03-16 06:10:50 INFO rasa\_sdk.executor - Registered function for ‘validate\_clientAuthForm’. 2022-03-16 06:10:50 INFO rasa\_sdk.endpoint - Action endpoint is up and running on [https://0.0.0.0:5055](https://0.0.0.0:5055) 2022-03-16 06:10:50 DEBUG rasa\_sdk.utils - Using the default number of Sanic workers (1). 2022-03-16 06:10:50 DEBUG rasa.utils.tensorflow.models - Finished loading the model. 2022-03-16 06:10:50 DEBUG rasa.utils.tensorflow.models - Loading the model from /tmp/tmpfvcjqcpr/nlu/component\_8\_ResponseSelector.tf\_model with finetune\_mode=False… 2022-03-16 06:10:50 DEBUG rasa.nlu.selectors.response\_selector - Following metrics will be logged during training: 2022-03-16 06:10:50 DEBUG rasa.nlu.selectors.response\_selector - t\_loss (total loss) 2022-03-16 06:10:50 DEBUG rasa.nlu.selectors.response\_selector - r\_acc (response acc) 2022-03-16 06:10:50 DEBUG rasa.nlu.selectors.response\_selector - r\_loss (response loss) 2022-03-16 06:10:54 DEBUG rasa.utils.tensorflow.models - Finished loading the model. 2022-03-16 06:10:54 DEBUG rasa.utils.tensorflow.models - Loading the model from /tmp/tmpfvcjqcpr/nlu/component\_9\_ResponseSelector.tf\_model with finetune\_mode=False… 2022-03-16 06:10:54 DEBUG rasa.nlu.selectors.response\_selector - Following metrics will be logged during training: 2022-03-16 06:10:54 DEBUG rasa.nlu.selectors.response\_selector - t\_loss (total loss) 2022-03-16 06:10:54 DEBUG rasa.nlu.selectors.response\_selector - r\_acc (response acc) 2022-03-16 06:10:54 DEBUG rasa.nlu.selectors.response\_selector - r\_loss (response loss) 2022-03-16 06:10:58 DEBUG rasa.utils.tensorflow.models - Finished loading the model. 2022-03-16 06:10:58 DEBUG rasa.core.tracker\_store - Attempting to connect to database via ‘mysql+pymysql://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’. 2022-03-16 06:10:58 DEBUG rasa.core.tracker\_store - Connection to SQL database ‘xxxxxxx’ successful. 2022-03-16 06:10:58 DEBUG rasa.core.tracker\_store - Connected to SQLTrackerStore. 2022-03-16 06:10:58 DEBUG rasa.core.lock\_store - Connected to lock store ‘RedisLockStore’. 2022-03-16 06:11:00 DEBUG rasa.model - Extracted model to ‘/tmp/tmp\_nz3yuii’. 2022-03-16 06:11:00 DEBUG rasa.utils.tensorflow.models - Loading the model from /tmp/tmp\_nz3yuii/core/policy\_2\_UnexpecTEDIntentPolicy/unexpected\_intent\_policy.tf\_model with finetune\_mode=False… 2022-03-16 06:11:09 DEBUG rasa.utils.tensorflow.models - Finished loading the model. 2022-03-16 06:11:09 WARNING rasa.shared.utils.common - The UnexpecTED Intent Policy is currently experimental and might change or be removed in the future 🔬 Please share your feedback on it in the forum ([http://forum.rasa.com](http://forum.rasa.com)) to help us make this feature ready for production. 2022-03-16 06:11:09 DEBUG rasa.utils.tensorflow.models - Loading the model from /tmp/tmp\_nz3yuii/core/policy\_3\_TEDPolicy/ted\_policy.tf\_model with finetune\_mode=False… 2022-03-16 06:11:18 DEBUG rasa.utils.tensorflow.models - Finished loading the model. 2022-03-16 06:11:18 DEBUG rasa.core.nlg.generator - Instantiated NLG to ‘TemplatedNaturalLanguageGenerator’. 2022-03-16 06:11:18 INFO root - Rasa server is up and running. 2022-03-16 06:11:18 DEBUG rasa.core.channels.socketio - User cp6XV6T60XCEImYAAAAB connected to socketIO endpoint. 2022-03-16 06:11:19 DEBUG rasa.core.channels.socketio - User cp6XV6T60XCEImYAAAAB connected to socketIO endpoint. 2022-03-16 06:11:19 DEBUG rasa.core.channels.socketio - User GQ8LBrHjc7GOTyG1AAAD connected to socketIO endpoint. 2022-03-16 06:11:19 DEBUG rasa.core.channels.socketio - User GQ8LBrHjc7GOTyG1AAAD connected to socketIO endpoint. 2022-03-16 06:12:00 DEBUG rasa.core.channels.socketio - User cp6XV6T60XCEImYAAAAB disconnected from socketIO endpoint. 2022-03-16 06:12:01 DEBUG rasa.core.channels.socketio - User a-eQPq-vwt512F2iAAAF connected to socketIO endpoint. 2022-03-16 06:12:01 DEBUG rasa.core.channels.socketio - User a-eQPq-vwt512F2iAAAF connected to socketIO endpoint. 2022-03-16 06:12:03 DEBUG rasa.core.lock\_store - Issuing ticket for conversation ‘a95050c54fa844b78968726953a2d2e6’. 2022-03-16 06:12:03 DEBUG rasa.core.lock\_store - Acquiring lock for conversation ‘a95050c54fa844b78968726953a2d2e6’. 2022-03-16 06:12:03 DEBUG rasa.core.lock\_store - Acquired lock for conversation ‘a95050c54fa844b78968726953a2d2e6’. 2022-03-16 06:12:03 DEBUG rasa.core.tracker\_store - Can’t retrieve tracker matching sender id ‘a95050c54fa844b78968726953a2d2e6’ from SQL storage. Returning `None` instead. 2022-03-16 06:12:03 DEBUG rasa.core.tracker\_store - Tracker with sender\_id ‘a95050c54fa844b78968726953a2d2e6’ stored to database 2022-03-16 06:12:03 DEBUG rasa.core.processor - Starting a new session for conversation ID ‘a95050c54fa844b78968726953a2d2e6’. 2022-03-16 06:12:03 DEBUG rasa.core.processor - Policy prediction ended with events ‘’. 2022-03-16 06:12:03 DEBUG rasa.core.processor - Action ‘action\_session\_start’ ended with events ‘[\<rasa.shared.core.events.SessionStarted object at 0x7f93b85afd00\>, ActionExecuted(action: action\_listen, policy: None, confidence: None)]’.

---

<div class="post-metadata">

**Author:** ![lis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lis/32/18141_2.png) [@lis](https://forum.rasa.com/u/lis)\
**Post date:** [March 16, 2022, 9:34am UTC](https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963/8 "2022-03-16T09:34:47Z")

</div>

@ck4all89 so this error occurs only in in memory lock store, is it? one possible reason could be is that the action before validate\_clientAuthForm is getting into an infinite loop? did you check this?

---

<div class="post-metadata">

**Author:** ![ck4all89](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ck4all89/32/19953_2.png) [@ck4all89](https://forum.rasa.com/u/ck4all89)\
**Post date:** [March 16, 2022, 11:52am UTC](https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963/9 "2022-03-16T11:52:42Z")

</div>

Hi San, thanks for reply.

I had implemented some codes as follows for my Chat Bot-

rules.yml

 ![rules](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/0/5/05463b9aa4561294d6ab1f0756335f34b8f6568e.png)

stories.yml

 ![stories](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/e/4/e40a89d6cb042d2c5f33127a751acf510da9e020.png)

and remaining files- domain.yml, config.yml and action.py:

[domain.yml](https://forum.rasa.com/uploads/short-url/lHrUHSNeror3V3UnLTXKIoP88Bu.yml) (7.4 KB)

[config.yml](https://forum.rasa.com/uploads/short-url/WR1WzlzlCccIpQM0QmgILcctUo.yml) (961 Bytes)

[actions.py](https://forum.rasa.com/uploads/short-url/fkB253jdafdm08sAPvu5lMToWcy.py) (4.6 KB)

Also, it works fine on my localhost, but when I run it on aws, then it creating issue.

Please, let me know if I missed anything else… Thanks

---

<div class="post-metadata">

**Author:** ![lis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lis/32/18141_2.png) [@lis](https://forum.rasa.com/u/lis)\
**Post date:** [March 16, 2022, 12:45pm UTC](https://forum.rasa.com/t/failed-to-acquire-lock-for-conversation-id/51963/10 "2022-03-16T12:45:07Z")

</div>

@ck4all89 why is there another form activation in your stories.yml? Either you activate-deactivate in rules.yml or you can do that in stories.yml I believe. Anyways, in your story you have put active\_loop: clientAuthForm, your story should be like:

```auto
intent: get_started
action: clientAuthForm
active_loop: clientAuthForm
active_loop: null
action: action_store_client_details

```

P.S: I’ve added the custom action from what I understood. You can ignore that also.
