Understanding Connection Timeouts

Connection timeouts are one of the most common issues in uptime monitoring. This guide explains what timeouts mean, why they occur, and how to configure optimal timeout settings for your monitors.

What Is a Connection Timeout?

A connection timeout occurs when StatusDrift’s monitoring server doesn’t receive a response from your website within a specified time limit. When this happens, the monitor is marked as “down” because we can’t confirm your site is responding properly.

It’s important to understand that a timeout doesn’t necessarily mean your site is completely down—it means it didn’t respond quickly enough.

Timeout Phases

A complete HTTP request involves several phases, each of which can timeout:

1. DNS Resolution

Converting your domain name to an IP address. Typically takes 10-100ms but can take longer if DNS servers are slow or unreachable.

2. TCP Connection

Establishing the initial connection to your server. This is the “handshake” phase. Issues here usually indicate network problems or firewall blocks.

3. TLS/SSL Handshake

For HTTPS sites, negotiating the secure connection. This adds extra round trips and can be slow if your server’s SSL configuration isn’t optimized.

4. Time to First Byte (TTFB)

Waiting for your server to start sending the response. High TTFB often indicates server-side processing delays (slow database queries, heavy computation, etc.).

5. Content Download

Receiving the full response. For keyword monitoring, we need to download enough content to check for your keyword.

Default Timeout Settings

StatusDrift uses these default timeout values:

PhaseDefault Timeout
Total Request30 seconds
Connection10 seconds
DNS Resolution5 seconds

These defaults work well for most websites. However, you may need to adjust them for specific use cases.

When to Increase Timeout

Consider increasing your timeout settings if:

  • Your site has dynamic content – Pages that generate content on-the-fly (e.g., from database queries) may need more time
  • You’re monitoring APIs – API endpoints that perform complex operations may require longer timeouts
  • Geographic distance – If your server is far from monitoring locations, network latency adds up
  • Shared hosting – Shared servers can have variable response times during peak usage
  • Heavy pages – Pages with lots of server-side processing need more time

When to Decrease Timeout

Consider decreasing your timeout settings if:

  • User experience matters – If a 10-second response is unacceptable to your users, you want to know about it
  • You have SLA requirements – Some SLAs define specific response time thresholds
  • Static content – Static sites should respond very quickly; slow responses indicate problems
  • You want early warning – Shorter timeouts catch performance degradation before it becomes severe

Configuring Timeout Settings

To adjust timeout settings for a monitor:

1. Navigate to Monitors and select the monitor to edit.

2. Click Settings or the gear icon.

3. Find the Timeout section.

4. Adjust the timeout value (in seconds).

5. Click Save Changes.

Recommended settings by use case:

Use CaseRecommended Timeout
Static website10-15 seconds
WordPress/CMS site20-30 seconds
E-commerce site30-45 seconds
Complex API endpoint45-60 seconds
Report generation endpoint60+ seconds

Troubleshooting Frequent Timeouts

If you’re experiencing frequent timeout errors:

1. Check Your Server Performance

  • Review server CPU and memory usage during timeout periods
  • Check for slow database queries
  • Look for resource-intensive plugins or scripts
  • Monitor PHP execution times (for PHP-based sites)

2. Verify Network Path

  • Ensure StatusDrift IPs aren’t being rate-limited or blocked
  • Check if your CDN or WAF is causing delays
  • Test response times from different geographic locations

3. Optimize Your Site

  • Enable caching (page cache, object cache, CDN)
  • Optimize database queries and indexes
  • Reduce server-side processing on monitored pages
  • Consider using a dedicated monitoring endpoint

4. Review Monitor Configuration

  • Monitor a lightweight page instead of your homepage if it’s heavy
  • Create a simple health-check endpoint that responds quickly
  • Disable unnecessary features like screenshot capture for slow pages

Creating a Health Check Endpoint

For the most reliable monitoring, consider creating a dedicated health check endpoint. This is a simple page that:

  • Responds quickly (under 1 second)
  • Checks critical dependencies (database, cache, external services)
  • Returns a clear status code

Example health check response:

{
  "status": "healthy",
  "timestamp": "2024-01-15T10:30:00Z",
  "checks": {
    "database": "ok",
    "cache": "ok",
    "disk_space": "ok"
  }
}

Monitor this endpoint with keyword monitoring, checking for “healthy” in the response.

Timeout vs. Slow Response Alerts

StatusDrift offers two ways to catch slow sites:

  • Timeout – Marks the site as DOWN when response exceeds the limit
  • Slow Response Alert – Sends a warning but keeps the site marked as UP

For most users, we recommend:

  • Set timeout high enough to avoid false positives (30+ seconds)
  • Set slow response alerts at your acceptable performance threshold (e.g., 5 seconds)

This way, you’re alerted to performance issues without generating false downtime reports.

Related Articles

Was this article helpful?