# Synthetic Monitoring browser timeout

**URL:** https://discuss.elastic.co/t/synthetic-monitoring-browser-timeout/267620
**Category:** Synthetics
**Tags:** synthetics
**Created:** [March 18, 2021, 8:31am UTC](https://discuss.elastic.co/t/synthetic-monitoring-browser-timeout/267620 "2021-03-18T08:31:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![shinmaeng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shinmaeng/32/85734_2.png) [@shinmaeng](https://discuss.elastic.co/u/shinmaeng)
#### Post date: [March 18, 2021, 8:31am UTC](https://discuss.elastic.co/t/synthetic-monitoring-browser-timeout/267620/1 "2021-03-18T08:31:03Z")

</div>

Hi, Elastic staffs.

I'm testing Synthetic monitoring tool to check my company's website uptime and performance.  
I'm using your code, config and image that you support on github.

I have a question about monitoring cofiguration in heartbeat.docker.yml file.  
The website that I want to check takes about 2~3s, so I set the timeout config to 1s in heartbeat monitors in the yaml file like below.

```auto
- type: browser
  id: my-monitor
  name: My Monitor
  schedule: "@every 1m"
  script: |-
    step("load homepage", async () => {
        await page.goto('https://elastic.com');
    });
  **timeout: 1s**

```

I expected that the status of the website mornitoring got fail, but it got suceess nevertheless the duration time is over the timeout that I set 1sec.

How can I set the timeout configuration of browser monitoring in Synthetic.

Thank you in advance.

---

<div class="post-metadata">

### Author: ![PaulB-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paulb-elastic/32/78691_2.png) [@PaulB-Elastic](https://discuss.elastic.co/u/PaulB-Elastic)
#### Post date: [March 18, 2021, 11:31am UTC](https://discuss.elastic.co/t/synthetic-monitoring-browser-timeout/267620/2 "2021-03-18T11:31:50Z")

</div>

Hi @shinmaeng, the `timeout` parameter is only used by the ping type of monitors, not for synthetics.

You can set the timeout for your page load as a parameter to the `goto` method, for example:

```auto
await page.goto('https://elastic.com', { timeout:1000 });

```

This sets the timeout in milliseconds.

We do have an open issue to make this an option at the UJ/step level too, which will add more flexibility in the future: [Configurable timeouts (UJ and Step Level) · Issue #133 · elastic/synthetics · GitHub](https://github.com/elastic/synthetics/issues/133)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 11, 2021, 11:32am UTC](https://discuss.elastic.co/t/synthetic-monitoring-browser-timeout/267620/3 "2021-04-11T11:32:19Z")

</div>

This topic was automatically closed 24 days after the last reply. New replies are no longer allowed.
