Re: slow 304 response

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
Hi Anne,

As usual, I fail to reproduce this :-( Please make a complete setup
available to me ...

My current working hypothesis is that the content-length of the reply
does not match the actual data length, causing the client to wait for
all the data. After keep_alive_timeout (default 2 sec), the server will
close the connection and the client probably continues.

Only, this should show a 2.00 sec timeout on each page instead of 1.00,
unless you changed the keep_alive_timeout ...

If this hypothesis is correct it should reproduce on my system.  May depend
on Linux/Windows.  May depend on the locale (LANG) setting.

To verify, you may change the keep_alive_timeout to see whether it changes
the delay.  Another debug trick might be (on the server):

   ?- debug_message_context(+time).
   ?- debug(http(_)).

That will print quite detailed messages on what the server is doing with
millisecond timing info.

	Hope this helps --- Jan

On 09/05/2013 02:05 AM, Anne Ogborn wrote:
> I'm developing a server locally, and using�
>
> user:file_search_path(static_files, assets).
>
>
> http_reply_from_files(static_files(.), [], Request).
>
>
> to serve the swipl owl the same size as off the swipl web site. Sometimes the server responds slowly.
>
> After some amount of trying various server configurations, etc I discovered that the slow loads correspond
> to the server responding 304 NOT MODIFIED � These are taking 2.00 sec on my machine, while 200 OK responses
> are taking 5 msec.�
> Firebug on Firefox reports this sequence of events:
> within a few msec of the request, the html comes back.
> (presumably shortly afterwards we request the js and css resources from the head)
> 1 second later the js and css come back, actual transfer taking a few sec
> 1 second after that the image comes back.
>
> �The round number of 2.00 sec is quite reliable, which leads me to suspect the 1 sec is some constant deep within swipl http.�
>
> directly asking for the owl (that is, typing localhost:7777/f/swipl.png into the URL bar) makes it always come back immediately, even if it 304's.
>
> I've tried it with both chrome and firefox.�
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>

_______________________________________________
SWI-Prolog mailing list
[email protected]
https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.