Title: Error Accessing DB on first load&#8230;
Last modified: August 19, 2016

---

# Error Accessing DB on first load…

 *  Resolved [fatalverve](https://wordpress.org/support/users/fatalverve/)
 * (@fatalverve)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/error-accessing-db-on-first-load/)
 * When I access my WordPress main page for the first time I get the following error:
 * “Error establishing a database connection”
 * Right after the error page loads, I can refresh and it will connect just fine.
   From there I can navigate the site just fine.
    When I leave the site standing
   for a period longer than my database timeout, the issue will occur again.
 * Any ideas on how I could resolve this issue? I’ve looked around and can’t find
   anything on verifying the connection to the DB before loading the page.
 * Thanks in adavance for any help received.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/error-accessing-db-on-first-load/#post-942881)
 * What does your host have to say about the problem?
 *  Thread Starter [fatalverve](https://wordpress.org/support/users/fatalverve/)
 * (@fatalverve)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/error-accessing-db-on-first-load/#post-942960)
 * I am the host. This in on an internal network.
    It seems like the page is loading
   faster than the time it takes to log into the DB. The page loads pretty fast,
   it’s not like it sits for any more than a quarter of a second. Then refresh and
   it’s in. Is there a way to have the page wait until a successful login is accomplished?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error Accessing DB on first load…’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [fatalverve](https://wordpress.org/support/users/fatalverve/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/error-accessing-db-on-first-load/#post-942960)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
