#1
  1. hiding my <b> from ur <strong>
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2004
    Posts
    959
    Rep Power
    181

    Sleep processes w/ many rows examined


    I write code that pings a DB server that another piece of code also pings, although it pings a separate DB on that server. The server's CPU is currently taking a hit and I'm trying to figure out why.

    Running show full processlist is bringing back a bunch of lines from the other DB, though I'm unclear of exactly what's happening. Many lines with "Query" seem to be 'stuck', as in they always show up, and yet their times are always 1 or 2 and running the queries on their own seem to take a reasonably short amount of time. After a "Query" command, there appear to be several "Sleep" commands, which continue to go on longer and longer. I'd imagine the SQL connection isn't being closed properly on these, which might not be so big a deal, except for the noted CPU problem. Also, oddly, the "rows examined" on some of these Sleep commands are huge...much larger than the amount of rows analyzed by the Query commands before them.

    Any idea what might be going on? Could this be the CPU culprit or am I barking up the wrong tree?

    I've attached a screenshot of show full processlist.

    Thanks for any quick help you can provide.
    Attached Images
    ****
    Enjoy my post? Drop some props by hitting the scales button up top. JBL

    Website Design in Los Angeles and Washington, DC by PoweredPages.com
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    158
    Rep Power
    10
    How does this pinging work?

    And do you have a querylog running on the server?
  4. #3
  5. hiding my <b> from ur <strong>
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2004
    Posts
    959
    Rep Power
    181
    By pinging I simply mean its connecting to the db through a standard mysql connection call, to a DB server on the same stack.

    I do not believe we have a full log, no. Would grow too fast.
    ****
    Enjoy my post? Drop some props by hitting the scales button up top. JBL

    Website Design in Los Angeles and Washington, DC by PoweredPages.com
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    158
    Rep Power
    10
    By pinging I simply mean its connecting to the db through a standard mysql connection call, to a DB server on the same stack.
    What do you consider to be a standard connection call? There are may ways to connect and some have problems, like PHP's pconnect().

    I do not believe we have a full log, no. Would grow too fast.
    You wouldn't run it constantly, but it seems logical to run it while you are examining a problem. How else are you going to find out what the datbase is really doing when the problem occurs?

IMN logo majestic logo threadwatch logo seochat tools logo