WordPress.org

Ready to get started?Download WordPress

Forums

Wordfence Security
[resolved] Too Many MySQL connections (8 posts)

  1. LimeCanvas
    Member
    Posted 1 year ago #

    Hi Mark,

    You marked my issues as being resolved in this thread when it has not been:
    http://wordpress.org/support/topic/too-many-mysql-connections-1

    - - -
    Our host has come back with their setting of max_user_connections=25.

    @mmaunder can you suggest a minimum max_user_connections setting to use with your plugin?

    And is there any way to reduce the max_user_connections the plugin uses?

    Cheerz,
    Wil.

    http://wordpress.org/extend/plugins/wordfence/

  2. Beach Carolina Magazine
    Member
    Posted 1 year ago #

    It would be nice for those of us having this issue to get a valid answer/solution for the problem. Like Lime Canvas, I too am seeing this problem occur and need an answer to his question.

  3. José Luís
    Member
    Posted 1 year ago #

    Make that three cases! ;)

  4. MickeyRoush
    Member
    Posted 1 year ago #

    You could try unchecking the "Enable Live Traffic View" that may help.

  5. Wordfence
    Member
    Plugin Author

    Posted 1 year ago #

    Hi folks,

    You need to set your max_user_connections to the number of Apache web server children X 2. This is the absolute minimum and ideally it should be X 4.

    DB connections don't consume much resources and having a separate connection for Wordfence gives a substantial performance boost. If your host is stingy on memory for your DB server, find another host.

    We don't have any issues regarding max_user_connections with premium hosts.

    MickeyRoush is correct that disabling live traffic may help with this. (Thanks for the suggestion!)

    Having said that, I do have an urgent issue logged to try and use the WPDB DB handle instead of creating a separate connection. So expect a possible improvement in another release.

    Closing this issue because this forum is not a bug tracking system and I've given you a comprehensive response.

    Regards,

    Mark.

  6. LimeCanvas
    Member
    Posted 1 year ago #

    Thanks for your response @mmaunder

    I expect that may people running sites on shared hosting, like mine, will not be able to use your plugin as we have no control over the max_user_connections setting :-(

    Regards,
    Wil.

  7. Wordfence
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Wil. I'll see if I can improve this.

    Regards,

    Mark.

  8. José Luís
    Member
    Posted 1 year ago #

    Mark,

    I'm also getting these messages on my error_log:

    PHP Warning:  mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home1/mydomain/public_html/wp-content/plugins/wordfence/lib/wfDB.php on line 56
    PHP Warning:  mysql_ping() expects parameter 1 to be resource, boolean given in /home1/mydomain/public_html/wp-content/plugins/wordfence/lib/wfDB.php on line 52
    PHP Warning:  mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home1/mydomain/public_html/wp-content/plugins/wordfence/lib/wfDB.php on line 57

    Unfortunately, I did not quite understand what you said:

    You need to set your max_user_connections to the number of Apache web server children X 2. This is the absolute minimum and ideally it should be X 4.

    How can I check my number of Apache web server children?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.