SSI with shtml - Apache stops sending files on localhost, I have to hit F5 repeatedly

Discussion in 'Apache' started by jfkelley, Dec 2, 2008.

  1. #1
    Apache 2.2.8, PHP 5.2.6, WinXP SP2

    Per instructions, I successfully enabled SSI (Server-Side Includes) with these lines in httpd.conf:

    In <Directory "c:/wamp/www/"> ...
    Options Indexes FollowSymLinks +Includes (I added +Includes)

    In <IfModule mime_module> ...
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml

    Problem: Apache, more often than not, will simply stop sending files (like my js, css, images, etc) after some random handful have been loaded (according to NET tab in FireBug). If I hit F5 multiple times, it usually manages to send everything.

    This is true in FF 3, IE 6. In Safari 3.2.1 I can't get the file fully loaded no matter how many times I hit F5.

    This is true regardless of whether I actually HAVE any include lines in the file.

    To my untrained eye, the logs are unremarkable. A bunch of 200's and 304's.

    It's like it only wants to send a few 200's at a time.

    Frankly, this is driving me nuts. I've spent hours searching about it on the web (I don't know what the "magic words" are to describe this problem). The problem has spanned 3 different computers with at least 5 different Win XP SP2 clean OS builds. It also happens with plain Apache and with the WAMP package, and has been happening over several versions of Apache.

    I've tried Win32DisableAcceptEx, and clearing my cache, and messing with ThreadsPerChild or something, and a whole bunch of other dead ends I found on the web.

    I did some other tests and the problem seems to be around using .shtml. I can get the SSI includes to work on .html files (at least it works better -- not sure yet if it works perfectly), however my web-hosting server insists on .shtml (I think for performance reasons).

    Tomcat works just fine with SSI on .shtml files (but I can't figure out how to get PHP working with Tomcat). And, all my .shtml files work just fine on my various web servers. It's just hard to debug my new code when I have to machine-gun F5 or else upload to the web to test.

    Please help. I'm at my wits' end (both of them ; - ).

    J.F. Kelley
     
    jfkelley, Dec 2, 2008 IP
  2. jfkelley

    jfkelley Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Sigh. I found out how to reconfigure my web-hosting company's apache to allow SSI with .html (taking a performance hit, I imagine). I modified my application to move from .shtml to .html (including writing re-director pages to replace all my old shtml files) and I'm still getting this wierd problem with Apache on localhost.

    It serves up a random subset of my files for a page and simply stops sending files. I have to hit F5 repeatedly to get everything loaded. Nothing out of the ordinary in the log files (as far as I can tell). Also: it doesn't hang on any particular files; the files it does load get loaded right away.

    Am I the only person who has this problem? Remember this has persisted over 3 physical machines (all IBM/Lenovo thinkpads of various models), and 5 WinXP OS builds. It happens with a variety of web applications with and without SSI, and happens in IE, FF and Safari.
     
    jfkelley, Dec 3, 2008 IP
  3. jfkelley

    jfkelley Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Win32DisableEx doesn't do it all by itself, you also have to UNCOMMENT the following:
    EnableMMAP off
    EnableSendfile off

    Lookie:

    http://www.brooks-bilson.com/blogs/rob/index.cfm/2008/1/4/Intermittent-Apache-Problems-and-winntaccept-Asynchronous-AcceptEx-failed

    (sorry, I'm a newbie and can't put in friendly urls yet)
     
    jfkelley, Dec 4, 2008 IP