• I have a project giving me error establishing database connection error, the project is next js and php . The number of posts present in wordpress for this project is about 100. But from time to time i am getting ‘ Error establishing database connection’ because of which i could not access the wordpress eventhough the site is working properly at the time of error.

    I have 150 connections for each user being set and this error is occuring only for wpadmin.

    In the error logs we are getting too many connections.

    Please assist us with this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello

    If the connection is randomly breaking, you should ask your host if they have logs to understand what is happening.

    Thread Starter sammishra

    (@sammishra)

    2023-11-07 11:17:59 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:17:59 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:17:59 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:17:59 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:18:01 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:18:01 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:18:10 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:18:10 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:18:11 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:18:11 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:18:11 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:18:11 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:18:11 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:18:11 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:18:11 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:21:49 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:21:49 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:21:49 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)
    
    2023-11-07 11:21:50 0 [Warning] Aborted connection 0 to db: 'unconnected' user: 'unauthenticated' host: 'connecting host' (Too many connections)

    These are the errors which we ae getting

    Moderator bcworkz

    (@bcworkz)

    Debugging intermittent errors is difficult. Try to find a situation such as a particular admin screen where the error consistently occurs. Attempt to isolate the cause. Deactivate all plugins and switch to a default Twenty* theme. If the error persists, either your WP installation has become corrupted or there’s a server configuration issue. If a corrupted installation is suspected, reinstall all core WP files. You likely need your host’s assistance to resolve server configuration issues.

    If the problem goes away with no plugins and a default theme, restore your normal theme, then your plugins, one at a time, testing after each. When the problem returns, the last activated module is the cause. Take up the issue with the devs responsible for that module through their dedicated support channel.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error establishing database connection error’ is closed to new replies.