Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
An obvious question, but what else (like a cronjob, or log rotation) happens at 6:25? – Alister Bulman Nov 13 '11 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 '11 at 9:27
I think arjarj nailed it. There's probably something like a logrotate script that sends a fatal signal or the like. – David Schwartz Nov 13 '11 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 '11 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 '11 at 19:19

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.