Often restarted

Discussion in 'General' started by palb, Jul 21, 2008.

  1. palb

    palb New Member

    Get this rather often.

    "Web server xxxx on xxx is automatically restarted"

    Any ideas to why?
  2. mistwang

    mistwang LiteSpeed Staff

  3. palb

    palb New Member

    Maybe it's not a bug but a configuration issue. Some thoughts, concerns and observations:

    - Running LWS 3.3.15 on Mac OS

    - Not sure how to read the Log-file. We have it on Debug, is that best? Where can I learn how to read the LWS entries?

    - Get this often "Failed to execute 'mpstat' command: No such file or directory"

    - Where in the log-file should I look? I guess just prior to when it says its been restarted, right?

    - When I get messages I get several messages seconds apart, so it must mean it restarts with seconds apart. Strange.

    - Can I have a VHosts in the list but not being active and connected to a Listener?

    - Can I control what VH that is started? Now it looks as if it starts VH that is not connected to a Listener. I know that I can control if Ruby is started or not, but what about the VH as such?
  4. mistwang

    mistwang LiteSpeed Staff

    On Mac OS you can run the debug build as well. Install gdb if it is not installed.

    log file should be at /opt/lsws/logs/error.log stderr.log

    You can ignore error message regarding mpstat.

    The backtrace from a core file is more important, log file can help sometimes, send us the log file if need.

    If a request crashes the server, browser will retries a few times, that's why you see them in cluster sometimes.

    You can have a vhost discounted to a listener, just "Instantiate" the vhost from template, then remove the listener to vhost mapping from the listener configuration.

    You can create a listener listen on private IP for internal test, and map VH to that listener.
  5. palb

    palb New Member

    Thanks. I'll have a look at gdb.

    Does this say something?

    2008-07-21 19:10:08.827 DEBUG [*:80] New connection from xx.xxx.xx.xxx:xxxx.
    2008-07-21 19:10:08.828 DEBUG [*:80] 1 connections accepted!
    2008-07-21 19:10:08.828 DEBUG [xx.xxx.xx.xxx:xxxx-0] HttpIOLink::handleEvents() events=1!
    2008-07-21 19:10:08.828 DEBUG [xx.xxx.xx.xxx:xxxx-0] HttpConnection::eek:nReadEx(), state: 0!
    2008-07-21 19:10:08.828 DEBUG [xx.xxx.xx.xxx:xxxx-0] readToHeaderBuf().
    2008-07-21 19:10:08.828 DEBUG [xx.xxx.xx.xxx:xxxx-0] Read from client: 179
    2008-07-21 19:10:08.828 DEBUG [xx.xxx.xx.xxx:xxxx-0] read 179 bytes to header buffer
    2008-07-21 19:10:08.828 DEBUG [xx.xxx.xx.xxx:xxxx-0] processHeader() return 0, header state: 3.
    2008-07-21 19:10:08.828 DEBUG [xx.xxx.xx.xxx:xxxx-0] readToHeaderBuf() return 0.
    2008-07-21 19:10:09.547 NOTICE [AutoRestarter] child process with pid=5764 received signal=11, no core file is created!
  6. mistwang

    mistwang LiteSpeed Staff

    It does not give enough information to have the problem fixed. Still need the backtrace from the core dump.

    If possible, please PM me your server login, I can take a look.
  7. palb

    palb New Member

    Not sure how to procede with gdb. How do I install it?
  8. mistwang

    mistwang LiteSpeed Staff

  9. palb

    palb New Member

    Not sure I can install it on Mac OS. Do you know?
  10. mistwang

    mistwang LiteSpeed Staff

    I think it should work, it does not hurt to give it a try.
    Or, you can get Xcode package from Apache developer connection, the package is huge though.
  11. palb

    palb New Member

    I have Xcode, though I've not gone to deep in it. Do you mean I can use that? Or I guess you mean I must have that in order to install gdb, right?
    Last edited: Jul 25, 2008
  12. palb

    palb New Member

    It's restarted very often. How annoying. What could we look at before we try gdb? Any settings for maximum connections, or? Can I look at the log-file to see what happened before the restart? Is there something wrong with my code that might be disclosed by the log-file?
  13. mistwang

    mistwang LiteSpeed Staff

    switch to the debug build, then check core file under /tmp/lshttpd/ or /tmp/lshttpd/bak_cores/, send us the core file.
    Let us know which version of MacOS are you using.
  14. mistwang

    mistwang LiteSpeed Staff

    Core file generated by non-debug build of lshttpd is not useful, should delete those core files after switching to the debug build. Debug build has the debug symbol, have negligible impact on performance of the server.
  15. palb

    palb New Member

    It seems that it's ok now. The problem might have been awstat and it's path. I had set it to use SSL, but when trying to access /awstat I got a strange url in the browser indicating that there was something wrong with the path or something else with awstat. Turning off "secure connection" solved it. At least its seems so. Haven't received any mails about restart lately.
  16. palb

    palb New Member

    I was to optimistic. It's restarted again. This is what happens right before:

    2008-07-29 11:17:59.238 DEBUG [*:80] New connection from xx.xx.xxx.xxx:xxxxx.
    2008-07-29 11:17:59.238 DEBUG [*:80] 1 connections accepted!
    2008-07-29 11:17:59.238 DEBUG [xx.xx.xxx.xxx:xxxxx-0] HttpIOLink::handleEvents() events=1!
    2008-07-29 11:17:59.238 DEBUG [xx.xx.xxx.xxx:xxxxx-0] HttpConnection::eek:nReadEx(), state: 0!
    2008-07-29 11:17:59.238 DEBUG [xx.xx.xxx.xxx:xxxxx-0] readToHeaderBuf().
    2008-07-29 11:17:59.238 DEBUG [xx.xx.xxx.xxx:xxxxx-0] Read from client: 210
    2008-07-29 11:17:59.238 DEBUG [xx.xx.xxx.xxx:xxxxx-0] read 210 bytes to header buffer
    2008-07-29 11:17:59.238 DEBUG [xx.xx.xxx.xxx:xxxxx-0] processHeader() return 0, header state: 3.
    2008-07-29 11:17:59.238 DEBUG [xx.xx.xxx.xxx:xxxxx-0] readToHeaderBuf() return 0.

    Can't this give a clue? Why else do you have a debug-log?

    Btw, this is what happens each time it's restarted. And it seems to be related to that particular ip, apparently owned by Microsoft. Hmm.
    Last edited: Jul 29, 2008
  17. mistwang

    mistwang LiteSpeed Staff

    Is there any core file under /tmp/lshttpd? send them to us.
  18. palb

    palb New Member

    What is the file name I should look for? Or do you mean all under lshttpd/?
  19. mistwang

    mistwang LiteSpeed Staff

    "core" or "core.*"
  20. palb

    palb New Member

    Sorry for my level of knowledge, but I see that GDB comes with Xcode. :)

    Not sure how to run it. Do I run "gdb lshttpd" or "gdb lsws"?

    Or:

    lsws-<version>/bin/lshttpd
    lsws-<version>/bin/lshttpd.dbg

    Not sure how these latter commands are related to gdb

Share This Page