Synthetic monitoring Timeout 30 seconds

Hi, Im new to Synthetic monitoring, after a month of good results, a couple of days ago the status of some of the monitors started to fail, with the error:

Error message
page.goto: Timeout 30000ms exceeded.

The inline script is basic just to log in in a page:

    inline:
      script: |-
        step("load homepage", async () => {
            await page.goto('https://client.page.cl/Login');
        });

I tried many things like adding waitUntil: networkidle, domcontentloaded

await page.goto('https://client.page.cl/Login', { waitUntil : "domcontentloaded"});

but It didnt work, then I tries 5 minutes of timeout and startet working again.

await page.goto('https://client.page.cl/Login', {timeout:300000});

But this is not the proper solution, I imagine.

How can I solve this?

and another related question, the webpage runs fast and well when is loaded in my browser, so I was thinking that some content is already in the cache of my browser? and every time heartbeat and playwright go to the webpage start from zero?

and script (client.page.cl/themes/angulr/libs/jquery/jquery/dist/jquery.js) and an image seems to take too long to load
demora2

Version 7.17.5
Thanks!

Hi @ElasticLiver,

The time a page takes to load is a test aspect itself, so by default all assertions timeout and fail when they exceed 30s, which could be overridden by , { timeout: <ms> } as you already discovered.

If that's not desirable, you can disable the timeout by providing 0 to an assertion e.g.

await page.goto('<url>', { timeout: 0 });

Tip:
Use timeout and waitUntil params together with page.goto e.g.

await page.goto('<url>', { timeout: 0, waitUntil: 'load' }); // If you care to capture page's screenshot

await page.goto('<url>', { timeout: 0, waitUntil: 'domcontentloaded' }); // If you don't care page's screenshot

await page.goto('<url>', { timeout: 0, waitUntil: 'commit' }); // If you just want to make sure page is accessible over the URL

Regarding resources taking long to load
It's true that a synthetics test opens a webpage in a blank session, so there are no cached resources, making a test slower compared to normal browsing. But there could be another aspect to it, depending on the version, Network may be throttled by default in a test browser session. You can confirm that by disabling the throttling by providing throttling: false e.g.

  ...
  schedule: '@every 10m'
  throttling: false
  source:
    inline:
      script: |-
        ...

Note this may or may not work depending on the version, you can confirm the results and try updating to newer version. Let us know if you need further assistance with this.

What's new
Creating browser monitors have become so much fun in the newer versions of Elastic Stack with Project Monitors where a browser journey could be authored and managed in an editor inside a project setup with all the tooling available. Then monitor's configuration such as throttling params could be viewed in Kibana GUI. Project monitors, defined once, could then be run hassle free on Elastic managed infrastructure or on premises using Private Locations. E.g. look here to see how easy would it become to configure timeout per step, journey or across the whole project.

If it sounds too much to read, just have a look at the short video walkthrough about what's new in Synthetics.

4 Likes

It seem that in 7.17.5 throttling cant be set yet, but I follow your recommendations and its working.

Thanks four your help, and clear comments!

1 Like

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