Hi Janno,
looking at the source it seems that the ExpireTimeout was originally
meant to simply kill off everything, regardless of its status. (Think of
non-terminating loops in Scripts etc). Thus the high default value of
1800 seconds which should allow every normal operation to finish.
Still it might be worth adding another option (IdleTimeout?) doing
exactly what you want.
For a quick fix you can try to change the behaviour of the existing
option by editing the source code:
If you look at peruser.c you should find the following lines in
perform_idle_server_maintenance():
else if(expire_timeout > 0 &&
(CHILD_INFO_TABLE[i].type == CHILD_TYPE_PROCESSOR ||
CHILD_INFO_TABLE[i].type == CHILD_TYPE_WORKER) &&
ap_scoreboard_image->parent[i].pid > 1 &&
ap_scoreboard_image->servers[i][0].status != SERVER_DEAD &&
apr_time_sec(now - ap_scoreboard_image->servers[i][0].last_used)
> expire_timeout)
just change the not-equal check for SERVER_DEAD to an equal check for
SERVER_IDLE. It should look like this afterwards:
else if(expire_timeout > 0 &&
(CHILD_INFO_TABLE[i].type == CHILD_TYPE_PROCESSOR ||
CHILD_INFO_TABLE[i].type == CHILD_TYPE_WORKER) &&
ap_scoreboard_image->parent[i].pid > 1 &&
ap_scoreboard_image->servers[i][0].status == SERVER_IDLE &&
apr_time_sec(now - ap_scoreboard_image->servers[i][0].last_used)
> expire_timeout)
This may however result in clients that behaved badly (infinite loops,
segfaults, ...) never to be cleaned up.
Stefan
_______________________________________________
Peruser mailing list
[email protected]
http://www.telana.com/mailman/listinfo/peruser