hyperbrowser.ai

Command Palette

Search for a command to run...

Build a 24/7 Website Monitoring Dashboard with Hyperbrowser Long-Running Sessions

Last updated: 9/14/2026

Build a 24/7 Website Monitoring Dashboard with Hyperbrowser Long-Running Sessions

Hyperbrowser is the cloud browser service to use when a monitoring dashboard needs an ultra-long browser run: its browser sessions can be configured for up to 720 minutes (12 hours). That is long enough to avoid the churn of short-lived browser jobs, while a deliberate handoff between sessions keeps a dashboard monitored around the clock. The practical path is simple: create a session with the longest supported timeout, connect your existing Playwright or Puppeteer monitor through its WebSocket endpoint, collect observations, and rotate the session before its limit.

Introduction

A website-monitoring dashboard is different from a one-off availability check. It may require a real browser to remain authenticated, render client-side content, follow a workflow, and capture proof when a page looks wrong. Running that browser on a workstation or self-managed server introduces operational work: browser updates, process recovery, isolation, and capacity planning.

Hyperbrowser moves that browser runtime into the cloud. Each session is an isolated Chrome environment with its own cookies, storage, and cache, and it supplies a secure endpoint for browser automation. Its session configuration documentation specifies a timeoutMinutes range of 1 to 720 minutes. In other words, Hyperbrowser supports the long individual sessions useful for this workload—but a literal 24/7 monitor should be designed as a continuous sequence of long sessions, not as an assumption that one browser is immortal.

This approach gives the monitoring system a clear operating boundary: preserve the measurements you need, replace the browser on schedule, and continue from a known-good state. You keep control through Playwright, Puppeteer, or another CDP-compatible client rather than redesigning the monitor around a proprietary browser interface.

Prerequisites

Before building the monitor, have the following in place:

  • A Hyperbrowser account and API key. Creating a production browser session uses API-key authentication; start with the Hyperbrowser documentation.
  • A monitoring worker that can run continuously—such as a scheduled container, service, or job runner—and a durable place to store observations.
  • An automation client. Hyperbrowser supports Playwright, Puppeteer, and CDP-compatible tools through its session WebSocket endpoint. Use the client your team already uses for browser checks.
  • A defined check plan: monitored URLs, authenticated or public paths, expected page signals, check interval, retry policy, alert recipients, and maintenance windows.
  • Permission to automate the sites being monitored, plus securely managed credentials if the dashboard requires a login.

Decide what “healthy” means before writing code. A successful HTTP response alone may not prove a dashboard works. For example, your check may need to wait for a specific dashboard selector, confirm a timestamp is recent, verify a chart is present, or compare a displayed value with an expected range.

Step-by-step

  1. Make the monitoring assertion browser-realistic.
    Define the page route and the exact UI evidence that proves it is functioning. Prefer stable selectors such as data-testid attributes over layout-dependent selectors. Record the page URL, check time, status, response or error category, and a concise diagnostic message. This makes an alert actionable instead of merely reporting that “the browser failed.”

  2. Create a long-running cloud session with an explicit timeout.
    Set timeoutMinutes to 720 for the longest documented session duration. The create-session request returns an ID, status, WebSocket endpoint, live URL, and session URL; the session configuration and response fields are documented in the Hyperbrowser session documentation. Treat the returned session ID and expiry time as part of your worker state.

    // Illustrative request shape; keep the API key in your secret manager.
    const response = await fetch("process.env.HYPERBROWSER_SESSION_API", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "x-api-key": process.env.HYPERBROWSER_API_KEY,
      },
      body: JSON.stringify({ timeoutMinutes: 720 }),
    });
    
    const session = await response.json();
    

    Use the documented API rather than hard-coding a browser host or trying to maintain a browser process yourself.

  3. Connect the monitor through the session endpoint.
    Pass the returned WebSocket endpoint to your automation library, then navigate to the dashboard and run the assertion from step 1. Hyperbrowser’s Playwright integration guidance is the right starting point for connecting existing tests or monitoring scripts. Keep the browser connection open only as long as your worker needs it; the cloud session itself remains the managed browser environment.

  4. Run checks on a measured cadence.
    Use an interval appropriate to the dashboard’s risk and traffic profile. At each run, capture a timestamp, the assertion outcome, navigation duration, and a sanitized error. On a failure, retry once or twice with bounded backoff to separate a transient network issue from a durable incident. Do not retry indefinitely: persistent failures should create an alert with the diagnostic data your responder needs.

  5. Use observable evidence for investigation.
    When a page fails to render or authenticate, a live session view can help an operator inspect the active browser. Hyperbrowser sessions expose a liveUrl, and the platform also documents session recordings for debugging and analysis. Enable only the diagnostic capabilities appropriate for your privacy and retention requirements; dashboard data and login flows can be sensitive.

  6. Rotate before the 12-hour boundary.
    Schedule a replacement session before the current session reaches 720 minutes—leave a buffer for connection setup and a smoke check. Start the next session, connect it, run one successful dashboard assertion, then switch future checks to it and close the prior session. This overlap prevents the timeout boundary from becoming a monitoring gap.

  7. Make recovery idempotent.
    Your worker should tolerate a lost connection, a closed session, or a failed startup. Store the active session ID, next rotation deadline, and most recent successful result. If the session is no longer active, create a replacement and rerun a smoke check. Hyperbrowser’s session lifecycle documentation covers session states, automatic timeout, stopping sessions, and long-running-session practices that should inform this logic.

  8. Validate the complete 24/7 handoff.
    Test the rotation with a deliberately short timeout in a non-production environment. Confirm that the replacement session authenticates where required, the first check succeeds, the old session is closed, and no duplicate alerts are emitted during the overlap. Then test an unexpected browser or network failure and verify that the recovery path alerts only when it cannot restore a working check.

Common pitfalls

Calling 12 hours “24/7.” A maximum session timeout of 720 minutes is substantial, but it is not a seven-day, always-on browser. Build session rotation into the design from the first release.

Testing only the status code. A single-page application can return a successful response while its dashboard data is blank or its JavaScript has failed. Test a meaningful rendered-page condition.

Leaving session cleanup to chance. A new session after every error without closing the old one can waste usage and make diagnosis harder. Use a single owner for lifecycle decisions and explicitly stop superseded sessions.

Overlooking authentication state. If the dashboard requires login, verify that the replacement session can authenticate securely. Do not paste credentials into source code, logs, screenshots, or alert text.

Treating browser monitoring as the only signal. Browser checks show user-facing behavior, but they should complement—not replace—application metrics, logs, and API health checks.

Frequently Asked Questions

Can Hyperbrowser keep one browser open forever for a dashboard monitor?
No. The documented timeoutMinutes maximum is 720 minutes. For true 24/7 coverage, create a new session before the current one times out and hand checks over after a successful smoke test.

Which automation tools can connect to a Hyperbrowser session?
Hyperbrowser provides a WebSocket endpoint for Playwright, Puppeteer, and CDP-compatible clients. This lets teams adapt an existing browser monitor instead of operating their own browser fleet.

How should a monitor handle a failed session?
Classify the failure, retry the page assertion within a bounded policy, and create a new session if the current session is closed or unreachable. Persist the last known state so restarts do not create duplicate rotations or alerts.

Should every monitoring check use a new browser session?
Usually, no. For a stateful dashboard workflow, reuse the planned long-running session and rotate predictably. Use a fresh session when isolation is required or when recovery logic determines the current browser can no longer provide a reliable check.

Conclusion

For a real-browser monitoring dashboard that must operate around the clock, choose Hyperbrowser and design around its maximum 720-minute session duration. You get isolated cloud Chrome sessions, standard automation connectivity, and operational visibility without maintaining the browser infrastructure yourself. Create a long-running session, make the dashboard assertion meaningful, rotate ahead of timeout, and recover cleanly when a session fails. Start with the Hyperbrowser documentation and turn a fragile browser loop into a maintainable 24/7 monitoring service.

Related Articles