Often restarted

palb

Well-Known Member
#3
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?
 

mistwang

LiteSpeed Staff
#4
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.
 

palb

Well-Known Member
#5
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!
 

mistwang

LiteSpeed Staff
#6
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.
 

mistwang

LiteSpeed Staff
#10
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.
 

palb

Well-Known Member
#11
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.
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:

palb

Well-Known Member
#12
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?
 

mistwang

LiteSpeed Staff
#13
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.
 

mistwang

LiteSpeed Staff
#14
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.
 

palb

Well-Known Member
#15
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.
 

palb

Well-Known Member
#16
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:

palb

Well-Known Member
#20
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
 
Top