Perhaps I've screwed something up in my Scoop install, but I seem to be
having some problems...

If a user asks for an URL that doesn't exist, like
http://www.test.com/blah.html, I get a file not found error in the error
log:

[Tue Aug 22 21:35:38 2006] [error] [client 68.176.106.65] File does not
exist: /websites/scoop.test.com/htdocs/blah.html

But the browser doesn't receive a 404, not the Apache default 404 or the
custom 404 we set up with an ErrorDocument directive.. The browser
"hangs" for about 10 seconds and then receives a blank page.

If I ask for something within a directory that has +ExecCGI in it, i.e.
http://www.test.com/twik/bin/foo, I get a "script not found or unable to
stat" error:

[Tue Aug 22 21:39:54 2006] [error] [client 68.176.106.65] script not
found or unable to stat: /websites/scoop.test.com/twiki/bin/foo

When I run an strace on the httpd process, and ask for this URL, it
looks like it's tries to open our 404 file, as is expected:

8179  20:38:09.979278 read(3, "GET /twiki/bin/foo HTTP/1.1\r\nHost:
www.test.com\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux i
686; en-US; rv:1.8.0.6) Gecko/20060808 Fedora/1.5.0.6-2.fc5
ExtraToolkit/0.2.2.2 Firefox/1.5.0.6 pango-text\r\nAccept: text/xml,app
lication/xml,application/xhtml+"..., 4096) = 495
8179  20:38:10.072896 rt_sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}, 8) = 0
8179  20:38:10.072969 time(NULL)        = 1156300690
8179  20:38:10.073088 stat64("/websites/www.test.com/twiki/bin/foo",
0xb0e8804) = -1 ENOENT (No such file or directory)
8179  20:38:10.073197 stat64("/websites/www.test.com/twiki/bin",
{st_dev=makedev(8, 10), st_ino=2195458, st_mode=S_IFDIR|075
5, st_nlink=2, st_uid=512, st_gid=512, st_blksize=4096, st_blocks=8,
st_size=4096, st_atime=2006/08/22-20:34:03, st_mtime=2006/04/0
6-14:38:36, st_ctime=2006/08/21-23:20:33}) = 0
8179  20:38:10.073420 open("/websites/www.test.com/twiki/bin/.htaccess",
O_RDONLY|O_LARGEFILE) = 9
8179  20:38:10.073503 fstat64(9, {st_dev=makedev(8, 10), st_ino=2195461,
st_mode=S_IFREG|0644, st_nlink=1, st_uid=512, st_gid=512,
st_blksize=4096, st_blocks=8, st_size=2256,
st_atime=2006/08/22-20:38:03, st_mtime=2005/12/05-11:29:34,
st_ctime=2006/08/19-00:37:3
2}) = 0
8179  20:38:10.073611 fstat64(9, {st_dev=makedev(8, 10), st_ino=2195461,
st_mode=S_IFREG|0644, st_nlink=1, st_uid=512, st_gid=512,
st_blksize=4096, st_blocks=8, st_size=2256,
st_atime=2006/08/22-20:38:03, st_mtime=2005/12/05-11:29:34,
st_ctime=2006/08/19-00:37:3
2}) = 0
8179  20:38:10.073717 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7200000
8179  20:38:10.073777 read(9, "# bin/.htaccess.txt\n#\n# Controls access
to TWiki scripts - to make Apache use it, rename this\n# f
ile to \'.htaccess\' and REPLACE THE FOLLOWING STRINGS WITH PATHS\n#
SPECIFIC TO YOUR INSTALLATION:\n#\n# !FILE_path_to_TWiki!\n#
  This is the absolute path to the"..., 4096) = 2256
8179  20:38:10.074465 read(9, "", 4096) = 0
8179  20:38:10.074520 close(9)          = 0
8179  20:38:10.074570 munmap(0xb7200000, 4096) = 0
8179  20:38:10.074676 time(NULL)        = 1156300690
8179  20:38:10.074741 write(15, "[Tue Aug 22 20:38:10 2006] [error]
[client 206.168.112.107] script not found or unable to stat: /w
ebsites/www.test.com/twiki/bin/foo\n", 140) = 140
8179  20:38:10.074907 stat64("/websites/www.test.com/htdocs/404.html",
{st_dev=makedev(8, 10), st_ino=2818066, st_mode=S_IFR
EG|0664, st_nlink=1, st_uid=512, st_gid=512, st_blksize=4096,
st_blocks=8, st_size=373, st_atime=2006/01/18-12:55:14, st_mtime=2006
/01/12-14:42:18, st_ctime=2006/08/19-00:02:17}) = 0

However, for whatever reason this doesn't happen. What does happen
though is that it seems that a bunch of Scoop queries are run in response:

8179  20:38:10.075079
open("/websites/scoop.cycling74.com/htdocs/.htaccess",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
8179  20:38:10.075381 rt_sigaction(SIGALRM, NULL, {0x82b1450, [],
SA_RESTORER|SA_INTERRUPT, 0x12ff88}, 8) = 0
8179  20:38:10.075622 dup2(15, 2)       = 2
8179  20:38:10.076368 socket(PF_FILE, SOCK_STREAM, 0) = 9
8179  20:38:10.076440 fcntl64(9, F_SETFL, O_RDONLY) = 0
8179  20:38:10.076492 fcntl64(9, F_GETFL) = 0x2 (flags O_RDWR)
8179  20:38:10.076548 connect(9, {sa_family=AF_FILE,
path="/var/lib/mysql/mysql.sock"}, 110) = 0
8179  20:38:10.076692 setsockopt(9, SOL_IP, IP_TOS, [8], 4) = -1
EOPNOTSUPP (Operation not supported)
8179  20:38:10.076793 setsockopt(9, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
8179  20:38:10.076854 read(9, "A\0\0\0", 4) = 4
8179  20:38:10.076912 read(9,
"\n5.0.22-standard-log\0I\236\2\0#jme2g2`\0,\242\10\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0m\'t7S{402Ka&\0",
65) = 65
8179  20:38:10.077016 write(9,
"?\0\0\1\217\242\0\0\0\0\0@\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0c74\0\24\211d\7\4\227\263\351v$\310\213/\365\264.0\326\233\373\304scoop\0",
67) = 67
8179  20:38:10.077122 read(9, "\1\0\0\2", 4) = 4
8179  20:38:10.077181 read(9, "\376", 1) = 1
8179  20:38:10.077242 write(9, "\t\0\0\3DWUV_LQ@\0", 13) = 13
8179  20:38:10.077322 read(9, "\7\0\0\4", 4) = 4
8179  20:38:10.077430 read(9, "\0\0\0\2\0\0\0", 7) = 7
8179  20:38:10.077574 fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
8179  20:38:10.077629 read(9, 0xbc3eca8, 8192) = -1 EAGAIN (Resource
temporarily unavailable)
8179  20:38:10.077687 fcntl64(9, F_SETFL, O_RDWR) = 0
8179  20:38:10.077738 write(9, "\21\0\0\0\3set autocommit=1", 21) = 21
8179  20:38:10.077815 read(9, "\7\0\0\1", 4) = 4
8179  20:38:10.077905 read(9, "\0\0\0\2\0\0\0", 7) = 7
8179  20:38:10.078306 fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
8179  20:38:10.078364 read(9, 0xbc3eca8, 8192) = -1 EAGAIN (Resource
temporarily unavailable)
8179  20:38:10.078418 fcntl64(9, F_SETFL, O_RDWR) = 0
8179  20:38:10.078466 write(9, "B\0\0\0\3SELECT last_update FROM
cache_time WHERE resource = \'refresh_all\'", 70) = 70
8179  20:38:10.078564 read(9, "\1\0\0\1", 4) = 4
8179  20:38:10.078629 read(9, "\1", 1)  = 1
8179  20:38:10.078686 read(9, "E\0\0\2", 4) = 4
8179  20:38:10.078741 read(9,
"\3def\5scoop\ncache_time\ncache_time\vlast_update\vlast_update\f?\0\v\0\0\0\3\1\0\0\0\0",
69) = 69
8179  20:38:10.078828 read(9, "\5\0\0\3", 4) = 4
8179  20:38:10.078883 read(9, "\376\0\0\2\0", 5) = 5
8179  20:38:10.078946 read(9, "\v\0\0\4", 4) = 4
8179  20:38:10.079001 read(9, "\n1156291017", 11) = 11
8179  20:38:10.079059 read(9, "\5\0\0\5", 4) = 4
8179  20:38:10.079115 read(9, "\376\0\0\2\0", 5) = 5
8179  20:38:10.079372 time(NULL)        = 1156300690
8179  20:38:10.079449 time(NULL)        = 1156300690
8179  20:38:10.080231 fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
8179  20:38:10.080289 read(9, 0xbc3eca8, 8192) = -1 EAGAIN (Resource
temporarily unavailable)
8179  20:38:10.080344 fcntl64(9, F_SETFL, O_RDWR) = 0
8179  20:38:10.080395 write(9, "u\0\0\0\3SELECT bid, block FROM blocks
WHERE bid=\'login_error_message\' OR bid=\'login_mail_message\' OR
bid=\'login_mail_failed\'", 121) = 121
8179  20:38:10.080515 read(9, "\1\0\0\1", 4) = 4
8179  20:38:10.080580 read(9, "\2", 1)  = 1
8179  20:38:10.080638 read(9, "-\0\0\2", 4) = 4
8179  20:38:10.080692 read(9,
"\3def\5scoop\6blocks\6blocks\3bid\3bid\f\10\0\36\0\0\0\375\3@\0\0\0",
45) = 45
8179  20:38:10.080778 read(9, "1\0\0\3", 4) = 4
8179  20:38:10.080833 read(9,
"\3def\5scoop\6blocks\6blocks\5block\5block\f\10\0\377\377\0\0\374\20\0\0\0\0",
49) = 49
8179  20:38:10.080912 read(9, "\5\0\0\4", 4) = 4
8179  20:38:10.080966 read(9, "\376\0\0\2\0", 5) = 5
8179  20:38:10.081029 read(9, "f\0\0\5", 4) = 4
8179  20:38:10.081083 read(9, "\23login_error_messageQ%%norm_font%%<FONT
COLOR=\"#FF0000\"><B>Login Incorrect</B></FONT>%%norm_font_end%%", 102)
= 102
8179  20:38:10.081204 read(9, "{\0\0\6", 4) = 4
8179  20:38:10.081259 read(9, "\21login_mail_failedh%%norm_font%%<FONT
COLOR=\"#FF0000\"><B>Could not mail password for
%%uname%%.</B></FONT>%%norm_font_end%%", 123) = 123
8179  20:38:10.081363 read(9, "\5\0\0\7", 4) = 4
8179  20:38:10.081417 read(9, "\376\0\0\2\0", 5) = 5
8179  20:38:10.081871 fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
8179  20:38:10.081929 read(9, 0xbc3eca8, 8192) = -1 EAGAIN (Resource
temporarily unavailable)
8179  20:38:10.081984 fcntl64(9, F_SETFL, O_RDWR) = 0
8179  20:38:10.082035 write(9, "<\0\0\0\3SELECT * FROM perm_groups WHERE
perm_group_id = \'Anonymous\'", 64) = 64
8179  20:38:10.082129 read(9, "\1\0\0\1", 4) = 4
8179  20:38:10.082197 read(9, "\4", 1)  = 1
8179  20:38:10.082255 read(9, "K\0\0\2", 4) = 4
8179  20:38:10.082309 read(9,
"\3def\5scoop\vperm_groups\vperm_groups\rperm_group_id\rperm_group_id\f\10\0002\0\0\0\375\3@\0\0\0",
75) = 75
8179  20:38:10.082399 read(9, "G\0\0\3", 4) = 4
8179  20:38:10.082454 read(9,
"\3def\5scoop\vperm_groups\vperm_groups\vgroup_perms\vgroup_perms\f\10\0\377\377\0\0\374\20\0\0\0\0",
71) = 71
8179  20:38:10.082540 read(9, "U\0\0\4", 4) = 4
8179  20:38:10.082595 read(9,
"\3def\5scoop\vperm_groups\vperm_groups\22default_user_group\22default_user_group\f?\0\1\0\0\0\3\0\0\0\0\0",
85) = 85
8179  20:38:10.082714 read(9, "S\0\0\5", 4) = 4
8179  20:38:10.082769 read(9,
"\3def\5scoop\vperm_groups\vperm_groups\21group_description\21group_description\f\10\0\377\377\0\0\374\20\0\0\0\0",
83) = 83
8179  20:38:10.082861 read(9, "\5\0\0\6", 4) = 4
8179  20:38:10.082916 read(9, "\376\0\0\2\0", 5) = 5
8179  20:38:10.082980 read(9, "\'\0\0\7", 4) = 4
8179  20:38:10.083035 read(9, "\tAnonymous\nview_polls\0010\17Anonymous
users", 39) = 39
8179  20:38:10.083106 read(9, "\5\0\0\10", 4) = 4
8179  20:38:10.083161 read(9, "\376\0\0\2\0", 5) = 5
8179  20:38:10.083481 fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
8179  20:38:10.083539 read(9, 0xbc3eca8, 8192) = -1 EAGAIN (Resource
temporarily unavailable)
8179  20:38:10.083593 fcntl64(9, F_SETFL, O_RDWR) = 0
8179  20:38:10.083644 write(9, "L\0\0\0\3SELECT section,sect_perms FROM
section_perms WHERE  group_id = \'Anonymous\' ", 80) = 80
8179  20:38:10.083743 read(9, "\1\0\0\1", 4) = 4
8179  20:38:10.083809 read(9, "\2", 1)  = 1
8179  20:38:10.083866 read(9, "C\0\0\2", 4) = 4
8179  20:38:10.083921 read(9,
"\3def\5scoop\rsection_perms\rsection_perms\7section\7section\f\10\0\36\0\0\0\375\3@\0\0\0",
67) = 67
8179  20:38:10.084008 read(9, "I\0\0\3", 4) = 4
8179  20:38:10.084063 read(9,
"\3def\5scoop\rsection_perms\rsection_perms\nsect_perms\nsect_perms\f\10\0\377\377\0\0\374\20\0\0\0\0",
73) = 73
8179  20:38:10.084151 read(9, "\5\0\0\4", 4) = 4
8179  20:38:10.084205 read(9, "\376\0\0\2\0", 5) = 5
8179  20:38:10.084268 read(9, "S\0\0\5", 4) = 4
8179  20:38:10.084323 read(9,
"\7artistsJ,norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories",
83) = 83
8179  20:38:10.084411 read(9, "V\0\0\6", 4) = 4
8179  20:38:10.084465 read(9,
"\ndevelopersJ,norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories",
86) = 86
8179  20:38:10.084552 read(9, "R\0\0\7", 4) = 4
8179  20:38:10.084606 read(9,
"\6eventsJ,norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories",
82) = 82
8179  20:38:10.084693 read(9, "S\0\0\10", 4) = 4
8179  20:38:10.084747 read(9,
"\7indepthJ,norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories",
83) = 83
8179  20:38:10.084833 read(9, "T\0\0\t", 4) = 4
8179  20:38:10.084887 read(9,
"\10journalsJ,norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories",
84) = 84
8179  20:38:10.084974 read(9, "P\0\0\n", 4) = 4
8179  20:38:10.085027 read(9,
"\4newsJ,norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories",
80) = 80
8179  20:38:10.085112 read(9, "Q\0\0\v", 4) = 4
8179  20:38:10.085166 read(9,
"\5pressJ,norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories",
81) = 81
8179  20:38:10.085252 read(9, "T\0\0\f", 4) = 4
8179  20:38:10.085325 read(9,
"\10studentsJ,norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories",
84) = 84
8179  20:38:10.085412 read(9, "U\0\0\r", 4) = 4
8179  20:38:10.085466 read(9,
"\ttutorialsJ,norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories",
85) = 85
8179  20:38:10.085553 read(9, "\5\0\0\16", 4) = 4
8179  20:38:10.085608 read(9, "\376\0\0\2\0", 5) = 5
8179  20:38:10.086109 time(NULL)        = 1156300690
8179  20:38:10.086276 time(NULL)        = 1156300690
8179  20:38:10.086343 time(NULL)        = 1156300690
8179  20:38:10.086412 time(NULL)        = 1156300690
8179  20:38:10.086469 time(NULL)        = 1156300690
8179  20:38:10.086531 time(NULL)        = 1156300690
8179  20:38:10.086590 time(NULL)        = 1156300690
8179  20:38:10.086901 fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
8179  20:38:10.086959 read(9, 0xbc3eca8, 8192) = -1 EAGAIN (Resource
temporarily unavailable)
8179  20:38:10.087013 fcntl64(9, F_SETFL, O_RDWR) = 0
8179  20:38:10.087065 write(9, "\206\0\0\0\3SELECT s.sid FROM stories s
LEFT JOIN viewed_stories v ON (s.sid = v.sid AND v.uid = \'-1\') WHERE
v.hotlisted = 1 ORDER BY s.time desc", 138) = 138
8179  20:38:10.087190 read(9, "\1\0\0\1", 4) = 4
8179  20:38:10.087258 read(9, "\1", 1)  = 1
8179  20:38:10.087316 read(9, "\34\0\0\2", 4) = 4
8179  20:38:10.087371 read(9,
"\3def\0\0\0\3sid\3sid\f\10\0\24\0\0\0\375\1\0\0\0\0", 28) = 28
8179  20:38:10.087442 read(9, "\5\0\0\3", 4) = 4
8179  20:38:10.087497 read(9, "\376\0\0\2\0", 5) = 5
8179  20:38:10.087558 read(9, "\5\0\0\4", 4) = 4
8179  20:38:10.087614 read(9, "\376\0\0\2\0", 5) = 5
8179  20:38:10.087756 time(NULL)        = 1156300690
8179  20:38:10.087825 time(NULL)        = 1156300690
8179  20:38:10.088523 time(NULL)        = 1156300690
8179  20:38:10.088586 time(NULL)        = 1156300690
8179  20:38:10.093267 time(NULL)        = 1156300690
8179  20:38:10.093369 time(NULL)        = 1156300690
8179  20:38:10.093451 time(NULL)        = 1156300690
8179  20:38:10.093519 time(NULL)        = 1156300690
8179  20:38:10.093585 time(NULL)        = 1156300690
8179  20:38:10.093648 time(NULL)        = 1156300690
8179  20:38:10.093714 time(NULL)        = 1156300690
8179  20:38:10.093780 time(NULL)        = 1156300690
8179  20:38:10.093852 time(NULL)        = 1156300690
8179  20:38:10.094837 fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
8179  20:38:10.094898 read(9, 0xbc3eca8, 8192) = -1 EAGAIN (Resource
temporarily unavailable)
8179  20:38:10.094958 fcntl64(9, F_SETFL, O_RDWR) = 0
8179  20:38:10.095011 write(9, "\1\0\0\0\1", 5) = 5
8179  20:38:10.095106 shutdown(9, 2 /* send and receive */) = 0
8179  20:38:10.095166 close(9)          = 0
8179  20:38:10.095683 time(NULL)        = 1156300690

The 404.html file never gets delivered, and it's not clear why all these
Scoop queries are run afterwards. If I take out the ErrorDocument
directive, I don't even get a default Apache 404, just the blank page.

One thing's for certain -- we've been having lots of problems with our
mod_perl-enabled httpd eating up tons of CPU, so much that it will
slowly grow to 100% of CPU consumption if not restarted within a few
hours. I'm definitely open to other reasons as to why our httpd tends to
eat up a lot of memory, but this behavior seems suspect. Any ideas as to
what's happening?

thx

w