Excessive MySQL Queries

Home Forums BulletProof Security Free Excessive MySQL Queries

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #8724
    Bea
    Participant

    Have an ongoing issue that cannot be sourced in one only wordpress site that has some errant configuration spawning hundreds of php generations.
    Have many sites all using pretty much the same tried and tested plugins.. but for some reason this one site is not behaving nor can the problem be sourced as each time is brings the system to its knees logs show different plugin or code causing the infinite loop.

    Found a note re conflicts and “general fix” for infinite loops.

    Not sure where in the public .htaccess file this fix should go so if you could please confirm that adding the fix below the rewrite loop or do I need to remove the rewrite loop = I would be ever grateful..

     # WP REWRITE LOOP START 
    RewriteEngine On 
    RewriteBase / 
    RewriteRule ^index\.php$ - [L]
    
    # .htaccess Fix for Infinite Loops 
    RewriteEngine On 
    RewriteCond %{ENV:REDIRECT_STATUS} 200 
    RewriteRule .* - [L]
    #8730
    AITpro Admin
    Keymaster

    EDIT:  This issue has to do with excessive MySQL Queries and is not an infinite loop issue/problem.

    There are 2 things in BPS that are known to cause an infinite loop if the problem is directly related to and being caused by standard BPS .htaccess code.

    1.  Blocking HEAD requests can cause an infinite looping problem with the Broken Link Checker plugin.

    Remove HEAD from the Request Methods .htaccess code.

    http://forum.ait-pro.com/forums/topic/my-host-deactivate-my-blog/

    2.  The ErrorDocument directive used for Security Logging can cause an infinite looping problem if your Host is already handling error logging.

    Turn off BPS Security Logging and see if the problem stops occurring.

    This code will only work if the infinite loop is caused by legitimate redirects that are conflicting/looping with each other.  It is actually better to figure out which redirects are conflicting/looping.  You can add this in your root .htaccess file above the Turn off your Server Signature code for testing.

    # .htaccess Fix for Infinite Loops
    RewriteEngine On
    RewriteCond %{ENV:REDIRECT_STATUS} 200
    RewriteRule .* - [L]
    
    # TURN OFF YOUR SERVER SIGNATURE
    ServerSignature Off

    http://forum.ait-pro.com/forums/topic/request-exceeded-the-limit-of-10-internal-redirects/#post-1425

    #8767
    Bea
    Participant

    EDIT:  This issue has to do with excessive MySQL Queries and is not an infinite loop issue/problem.

    Thanks – don’t have 1 –  have moved 2 to above turn off server signature and will see what eventuates, as a side note it does seem to have slowed down page load considerably.

    There is nothing in error logs. No script logs show errors in console so still trying to source the actual issue.

    #8768
    AITpro Admin
    Keymaster

    EDIT:  This issue has to do with excessive MySQL Queries and is not an infinite loop issue/problem.

    “… logs show different plugin or code causing the infinite loop…”

    This sounds more like a database problem, PHP coding problem somewhere (Theme, etc.) or Server problem.  Since other sites are not having this same problem on your Server then it is most likely not a Server problem.

    Do you actually really have an Infinite Redirect Loop problem or are you using the term “infinite loop” loosely.

    If this site has an infinite redirect loop problem then the error you will see in your Server logs is this below.  If you do not see this error in your Server logs then the problem is not an infinite redirect loop problem.

    [Sat Jan 26 13:15:00 2013] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.

    http://forum.ait-pro.com/forums/topic/request-exceeded-the-limit-of-10-internal-redirects/

     

    #8770
    Bea
    Participant

    EDIT:  This issue has to do with excessive MySQL Queries and is not an infinite loop issue/problem.

    I am using it loosely – as passed on by the server techs..

    ” Infinite looping appears to have caused your VPS to fully exhausting all memory in the VPS, resulting in the kernel killing mysql to free up memory in desperation to avoid kernel panic. This is being caused by coding which is generating 500 queries per second, which is also using the amount of CPU resources only appropriate for a commercial class dedicated server.”

     

    #8771
    AITpro Admin
    Keymaster

    EDIT:  This issue has to do with excessive MySQL Queries and is not an infinite loop issue/problem.

    Ah yeah, nope that is not an infinite redirect loop – shame on them.  ha ha 😉  The name of that type of problem is literally classified as “Excessive MySQL Queries”.  This type of problem does not have anything at all to do with .htaccess code, URL rewriting or .htaccess redirects.  So what would need to be looked at is what is generating MySQL Queries at such an excessive rate.  BPS does not do anything in this area with MySQL Queries so this problem cannot be caused by BPS.  Maybe try installing the P3 Plugin Profiler plugin to see if a plugin is generating excessive MySQL Queries.  It seems to me your Host support folks should be able to tell you exactly what is doing this on your website.

    #8772
    Bea
    Participant

    EDIT:  This issue has to do with excessive MySQL Queries and is not an infinite loop issue/problem.

    Thanks so much again.

    Yes I have asked if they can see the queries – (we cannot in any logs) can they just provide them.

    anyways will keep working on it.. thanks for your time again.

    Am using P3 but nothing obvious anytime it is run…

     

    #8773
    AITpro Admin
    Keymaster

    EDIT:  This issue has to do with excessive MySQL Queries and is not an infinite loop issue/problem.

    The MySQL Server logs will show where the queries are being made from.  Only the administrator of the MySQL Server can see that MySQL log files.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.