# ScenarioBackendException - "Failed to create scenario context"

**URL:** <https://forum.canton.network/t/scenariobackendexception-failed-to-create-scenario-context/80>\
**Category:** App Development\
**Tags:** damlc\
**Created:** [April 8, 2020, 12:54pm UTC](https://forum.canton.network/t/scenariobackendexception-failed-to-create-scenario-context/80 "2020-04-08T12:54:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/daniel/32/80_2.png) [@daniel](https://forum.canton.network/u/daniel)\
**Post date:** [April 8, 2020, 12:54pm UTC](https://forum.canton.network/t/scenariobackendexception-failed-to-create-scenario-context/80/1 "2020-04-08T12:54:12Z")

</div>

**Mod note: As of SDK 1.5.0 Scenarios have been superseded by the more powerful [Daml Script](https://docs.daml.com/daml-script/index.html). We now recommend using that for all purposes. [For more information, and to learn how to use Script please check out @Andreas’ post on our blog](https://daml.com/blog/engineering/daml-script-scenarios-2-0/).**

Recently we started seeing the following errors when running daml test

```haskell
  ScenarioBackendException {scenarioNote = "Failed to create scenario context", scenarioBackendError
  = BErrorClient (ClientIOError (GRPCIOBadStatusCode StatusDeadlineExceeded (StatusDetails
  {unStatusDetails = "Deadline Exceeded"})))}

```

Thanks to @cocreature’s suggestion, we increased the `grpc-timeout` in the project’s daml.yaml file.

---

<div class="post-metadata">

**Author:** ![anthony](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/anthony/32/419_2.png) [@anthony](https://forum.canton.network/u/anthony)\
**Post date:** [April 8, 2020, 1:12pm UTC](https://forum.canton.network/t/scenariobackendexception-failed-to-create-scenario-context/80/2 "2020-04-08T13:12:27Z")

</div>

Can you share a code example of what this change looks like in `daml.yaml`?

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [April 8, 2020, 7:26pm UTC](https://forum.canton.network/t/scenariobackendexception-failed-to-create-scenario-context/80/3 "2020-04-08T19:26:09Z")

</div>

The section in `daml.yaml` needs to look as follows:

```haskell
scenario-service:
   grpc-timeout: 60

```

This sets the timeout to 60 seconds. Note that for most projects there is no need to modify this. This only becomes necessary once projects grow very large.

You can find more information on the fields that you can use in `daml.yaml` at [https://docs.daml.com/tools/assistant.html#project-config-file-daml-yaml](https://docs.daml.com/tools/assistant.html#project-config-file-daml-yaml)

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [June 25, 2020, 1:27pm UTC](https://forum.canton.network/t/scenariobackendexception-failed-to-create-scenario-context/80/4 "2020-06-25T13:27:33Z")

</div>

A post was split to a new topic: [Failed to create scenario context in ex-healthcare-claims-processing](https://forum.canton.network/t/failed-to-create-scenario-context-in-ex-healthcare-claims-processing/732)
