0

I run thttpd to serve some perl files. But for some reason the daemon is exiting every second or third day. Strangely it's always at 6.25 am. Here are some lines from syslog:

Nov 10 06:25:40 b1 thttpd[6370]: up 86404 seconds, stats for 86404 seconds: 
Nov 10 06:25:40 b1 thttpd[6370]:   thttpd - 25 connections (0.000289338/sec), 1 max simultaneous, 625000 bytes (7.23346/sec), 2 httpd_conns allocated 
Nov 10 06:25:40 b1 thttpd[6370]:   libhttpd - 30 strings allocated, 8200 bytes (273.333 bytes/str) 
Nov 10 06:25:40 b1 thttpd[6370]:   map cache - 0 allocated, 0 active (0 bytes), 0 free; hash size: 0; expire age: 1800 Nov 10 06:25:40 b1 thttpd[6370]:   fdwatch - 20902 selects (0.24191/sec) 
Nov 10 06:25:40 b1 thttpd[6370]: timers - 2 allocated, 2 active, 0 free Nov 10 06:25:40 b1 thttpd[6370]: exiting

Any ideas?

5
  • An obvious question, but what else (like a cronjob, or log rotation) happens at 6:25? Nov 13, 2011 at 9:07
  • The "regular" (cron.daily, cron.weekly and cron.monthly in /etc/) cronjobs for debian run at 6:25. Is there a file for thttpd in those directories?
    – arjarj
    Nov 13, 2011 at 9:27
  • I think arjarj nailed it. There's probably something like a logrotate script that sends a fatal signal or the like. Nov 13, 2011 at 11:20
  • That is correct, cron.daily runs at 6:25 on this server. But I don't know what command is causing thttpd to exit. I just ran cron.daily manually and the daemon is still alive. Right now I look for a way to increase the log level for thttpd, hope I find something.
    – Tobe
    Nov 13, 2011 at 12:27
  • How did you run logrotate? You may need to use -f to force log rotation. Can you paste the logrotate file of thttpd? Specifically, look at postrotate script.
    – Khaled
    Nov 13, 2011 at 19:19

1 Answer 1

0

Watching it through gdb or at least attaching strace to it (strace -p [daemon pid] ) would probably tell you more about how it dies - at least some information about whether it crashes, is killed, or chooses voluntary exit for some reason.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .