1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Same Server: One Site OK - Other Completely Stuck

Discussion in 'Site & Server Administration' started by T0PS3O, Oct 9, 2005.

  1. #1
    Something new for me :confused:

    2 Sites one one server. Both pretty much the same script. Access the same database server (on same box). Both PHP / MySQL.

    One (the live one luckily) works just fine. The other one (dev site) is ocmpletely stuck. Loads for minutes but ends as 'document contains no data'. Checked the running processes and nothing is bogged down in terms of CPU or memory usage. Did a graceful restart of Apache which didn't solve anything either.

    I don't have a clue what it could be. I wasn't even editing any files, just managing some content via the site's back-end.

    They both use the same php executable so it's not likely to be PHP related, else the other site would have been down too, right? Can't be MySQL either, same story, other should be down too. Restarted Apache.

    What else can I do besides rebooting the whole machine? DNS / Virtual Host stuff seems OK too, and I didn't even touch it. Any ideas?
     
    T0PS3O, Oct 9, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    If they are using the same PHP files, are they referencing any other files (via include for example)? If so, try using the full file path to all the files you are referencing from within the PHP files.
     
    digitalpoint, Oct 9, 2005 IP
  3. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #3
    No, they're in their own directories and even though on the same software (osC) they use their own individual files. Nothing is crossed/shared but the database host (but again, individual databases).

    Thing is, nothing changed. All worked fine 10 minutes ago, I;m just doing some stuff in back-end (filling in some forms) and gone it is, one site completely dead as in loading for ages.

    Just double checked and all files are still there, nothing is missing.
     
    T0PS3O, Oct 9, 2005 IP
  4. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'm no expert but compared to my homebox, my server's swap file seems excessive:

    Real memory: 1027256 kB total / 891032 kB free Swap space: 1052216 kB total / 1037608 kB free

    Like I said, CPU can handle things blindfolded:

    CPU load averages: 0.00 (1 mins) , 0.00 (5 mins) , 0.00 (15 mins)

    So how do I reboot the whole machine remotely? I googled and it seems like there are plenty of commands that do the same but all have like 10 different options...

    It's all a mystery to me!
     
    T0PS3O, Oct 9, 2005 IP
  5. forkqueue

    forkqueue Guest

    Messages:
    401
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #5
    A simple 'reboot' at the command line should be all you need to reboot, but to be perfectly honest I see no reason to do so yet.

    Run top, and hit 'm' to show the process that's hogging all the memory. Kill if the process if it seems like something non-critical or restart the daemon via the init script (eg /etc/init.d/apache restart).

    As a general rule a Linux/Unix box should *never* need to be restarted. Of course, there are exceptions to every rule, but this *probably* isn't one of them :)
     
    forkqueue, Oct 9, 2005 IP
  6. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I haven't done so yet. I did restart my own box here hoping the browser was whack but no luck. I did get into the back-end of my own dev site once but terribly slow. Still loading ages now.

    I checked running processes in webmin (which also loads just fine) but really, there is nothing out of the ordinary it seems.

    I now call the URLs in my browser and it loads the title and that's it. The rest stays blank forever and at the end of frever it says the 'The document contains no data'. Actually, saying that, it just loaded again but terribly slowly...

    What really doesn't make sense to me is the fact that the other site runs smoothly.

    If a graceful Apache restart doesn't help, is there a way (and is there any chance it would make a difference) to give Apache a proper reboot?
     
    T0PS3O, Oct 9, 2005 IP
  7. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #7
    apachectl restart or apache2ctl restart (for apache2) will restart apache properly.

    Is there anything in the apache error log? it usually resides in /var/log/apache or /var/log/apache2, might be split up for your different virtualhosts, but else it's just called error_log or error.log.
     
    blinxdk, Oct 9, 2005 IP
  8. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Btw, as the other site loads fine, I do not think it's a resource problem, more likely it's a misconfiguration of something or a code error.

    Catch me on messenger if you want.
     
    blinxdk, Oct 9, 2005 IP
  9. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I haven't set up a proper log for this one yet so I'll have a look in the default. I looked at the running process on the command line as well but it's almost always 100% idle with occasional 'peaks' to 1% running.

    Just discovered that phpmyadmin also runs slow. It's on a 3d virtual host. So two seem pinned down, one is OK.

    I don't believe it's a code error. 1) I wasn2t coding and 2) both the front as well as back end of this one site do load now but very very slowly. And add to that that phpmyadmin is slow too (but faster than the dev site).

    I can try one more thing, that's killing the site's caching mechanism but to do that I'll have to get in the back-end somehow, which might take a while. If no luck I'll reboot the lot, Apache first.

    Thanks for helping out.
     
    T0PS3O, Oct 9, 2005 IP
  10. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Try this too: mysqladmin status - see if there are any slow queries.
     
    blinxdk, Oct 9, 2005 IP
  11. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Strange. It's all gone back to normal and I haven't done anything yet. Did find an IP which isn't mine in the logs trying to access my phpmyadmin a couple of minutes before this started but it doesn't seem like trouble. Will investigate (and blocked it even though it's already password protected).

    Thanks for magically fixing it guys :D
     
    T0PS3O, Oct 9, 2005 IP
  12. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Interesting, never seen that before. Although impressive, the stats seem OK.
     
    T0PS3O, Oct 9, 2005 IP
  13. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #13
    For even more information run mysqladmin extended-status, there is a lot of good stuff there that can help trouble shoot mysql.
     
    blinxdk, Oct 9, 2005 IP
    T0PS3O likes this.