Forum Moderators: phranque

Message Too Old, No Replies

apache clients fail to load random? files

clients on apache 2.0 randomly? receive 404 errors when accessing files

         

bryanscott

1:44 am on Jun 3, 2004 (gmt 0)

10+ Year Member




I am sure all of you are familiar with these pages and I can assure you that NONE are missing. One particular example is [example.com...]

This page should have the apache feather on the top, but the client is unable to load the image for what reason I don't know. I hope you do.

This kind of "file skipping" seems almost random. I have a raid0 setup on the server... perhaps its damaged? Loading the files from the server using the url: [localhost...] I can see everything perfectly. When I type in [example.com...] I start to get errors.

All the settings are default to my knowledge. I encountered this problem after serving apache 2.0.48, php 4.3, and mysql for 3 months with zero problems and perfect stability. I don't remember installing anything that could have messed this up. After it screwed up, I uninstalled everything and loaded it back up. Same problem.

Please help me. I like hosting my own site its very economical.

[edited by: jdMorgan at 1:56 am (utc) on June 3, 2004]
[edit reason] Removed specifics per TOS [/edit]

jdMorgan

1:58 am on Jun 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What do your access and error logs show for these failed loads?

Jim

bryanscott

2:42 am on Jun 3, 2004 (gmt 0)

10+ Year Member



In the access log:

failed loads show up like this:
24.129.91.201 - - [02/Jun/2004:21:37:58 -0400] "GET /manual/images/feather.gif HTTP/1.1" 206 5011

Note the 206 after the path name. Successful loads have either a 200 or a 304 in place of this 206. I'm not sure what this signifies. Maybe you can tell me.

Now for the error log. All I see are repetitions of the following 6 lines:

[Wed Jun 02 21:12:55 2004] [notice] Parent: Created child process 3960
[Wed Jun 02 21:12:56 2004] [notice] Child 3960: Child process is running
[Wed Jun 02 21:12:56 2004] [notice] Child 3960: Acquired the start mutex.
[Wed Jun 02 21:12:56 2004] [notice] Child 1544: Released the start mutex
[Wed Jun 02 21:12:56 2004] [notice] Child 3960: Starting 250 worker threads.
[Wed Jun 02 21:12:57 2004] [notice] Child 1544: Waiting for 250 worker threads to exit.
[Wed Jun 02 21:12:57 2004] [notice] Child 1544: All worker threads have exited.
[Wed Jun 02 21:12:57 2004] [notice] Child 1544: Child process is exiting

I don't recall seeing this in the error log when everything worked correctly. Thanks for your help.

jdMorgan

4:59 am on Jun 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



206 Partial Content
The server has fulfilled the partial GET request for the resource. The request must have included a Range header field (section 14.36) indicating the desired range. The response MUST include either a Content-Range header field (section 14.17) indicating the range included with this response, or a multipart/byteranges Content-Type including Content-Range fields for each part. If multipart/byteranges is not used, the Content-Length header field in the response MUST match the actual number of OCTETs transmitted in the message-body.

A cache that does not support the Range and Content-Range headers MUST NOT cache 206 (Partial) responses.


That's a very strange situation, in that it is not normal for a browser to request partial content on an image file, and/but it is unlikely that Apache would not know how to handle such a request if it got one.

Hopefully, someone more familiar with Apache processes can provide more information on your log process details.

Jim

gergoe

9:31 am on Jun 3, 2004 (gmt 0)

10+ Year Member



About the image; the 206 response indicates that the request was successful, but the response body does not contains the whole requested resource, only a part of it. This is not an error; it is equivalent to 200, just an indication that the response is not complete, so the proxies should not cache it as if it were a normal response. The number after the 206 is the size of the response (5 Kbytes), if you have the same feather.gif as I do, then it means that not the whole file is returned. This could be because of a corrupted cache on your machine, a badly configured browser, and maybe even a malfunction in Apache. Try checking the response for that file with a server header check tool, or with telnet. Clear the cache of your browser, check the settings of the browser, and if you have any firewall-like program like Norton Internet Security then disable it.

About the error log; this is not a serious thing, just the normal cycle of the apache child processes (generations). After you start apache, a generation of children is spawned, and they will start to serve the request, and after a certain time, they are replaced with a new generation of children. The only thing which I don't think is normal, that it starts with 250 concurrent slots, which is far too much for a small webserver; you might need to fine-tune your apache config. Are you running the Apache on linux?

bryanscott

2:08 am on Jun 8, 2004 (gmt 0)

10+ Year Member



Thanks for the help so far. I tried using telnet to connect to the my server, but I would get 501 errors (bad request) when I sent the command "GET /manual/images/feather.gif HTTP/1.1"

About the sessions - I don't run linux, I run winxp pro. How do I change the max sessions to a more reasonable value?

About deleting caches. I have cleared out the internet cache on the web client on my server (if that makes sense, I use IE on my server to view the website on my server). Does apache for winxp cache server files somewhere?

jdMorgan

2:27 am on Jun 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



With HTTP/1.1, the hostname will be required:

GET /manual/images/feather.gif HTTP/1.1<enter>
Host: www.example.org<enter><enter>

If you have any user-agent checking on the server, you may also want to throw a user-agent in there:

GET /manual/images/feather.gif HTTP/1.1<enter>
User-agent: Mozilla/4.0 (compatible; WebmasterWorldBrowser)<enter>
Host: www.example.org<enter><enter>

Jim

bryanscott

5:03 am on Jun 8, 2004 (gmt 0)

10+ Year Member



I got the telnet command you suggested above to work. It now gives me a 403 forbidden error.

I used another similar program, and when I send:

GET /manual/images/feather.gif HTTP/1.1
Host: localhost

I receive:

HTTP/1.1 200 OK
Date: Tue, 08 Jun 2004 04:57:50 GMT
Server: Apache/2.0.49 (Win32) PHP/4.3.6
Last-Modified: Thu, 05 Sep 2002 19:54:24 GMT
ETag: "7f03-1947-eb867c00"
Accept-Ranges: bytes
Content-Length: 6471
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: image/gif

\18P^\02QW\FA\15\98\B8\99\9B\BA)\11ZP\04`\B6\9B\C0)dL0\1Dd\D0e\02\11`\D2\F7\10\D5!\06\BF\19\9C\CE\09
<snip>
\FC\99\86$\0F\1A\04G\D8\E0=\D7\EFo\E0\C1\85\0F'\FE\FBn\C3\E3\8A1,\87\B8\B8\F1\8A\E4\C5\A5O\A7N< \00;

It seems that its starts to send the picture but then stops for some reason. Its looking like a server corruption. What files can be corrupted on apache the would cause the server to do this?

[edited by: jdMorgan at 5:26 am (utc) on June 8, 2004]
[edit reason] snipped unneeded content to fix scrolling [/edit]

jdMorgan

5:30 am on Jun 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can't answer your question, but I'd like to point out that a normal GIF file usually starts with "GIF89a" or similar in the first few characters. This does not appear to be a valid GIF-format file, or it has been corrupted or compressed. Have you got mod_gzip running on this server?

Jim

gergoe

12:57 pm on Jun 8, 2004 (gmt 0)

10+ Year Member



In the beggining of the thread you mentioned that it works from localhost, but not when using www.example.com. Try telnet in the same way as the error happens with your browser. Open the connection to the apache with telnet using the same hostname as you used in the browser, and use the same Host header in the request.

bryanscott

3:50 pm on Jun 8, 2004 (gmt 0)

10+ Year Member



Ok. I played around with it some more, and found out that accesses using localhost instead of www.example.com do NOT work.

Check this out: <snip>

Can you get any images over 4kb to load? I can't. Given that list, I can only access up to mod_rewrite_fig1.gif

Is there some way that apache is refusing to send files larger than 4kb? How do I change this?

[edited by: jdMorgan at 8:30 pm (utc) on June 8, 2004]
[edit reason] Snipped URLs per TOS [/edit]

gergoe

7:51 pm on Jun 8, 2004 (gmt 0)

10+ Year Member



You should not post urls like this on this board, but while it is there I checked it and it is working fine... I'm not sure about it, but this could be a network related problem; the default packet size is 4 kbytes (i think), which means if the server needs to send 8kbytes of data as response, then it will be two packets. Could be that only the first packet reaches your computer but not the rest. Try the following command from the command-line prompt:

ping [i]ip_of_your_server[/i] -l 8192

It might be working well (becuse ping uses icmp protocol while http uses tcp protocol), but I suggest you to reinstall the networking interfaces in your server and in your client as well. Based on the fact that I could download any of the pictures, you may have to start troubleshooting the client machine (or any networking devices in between).

<add>
There's no limitation on the size of the response or on the resurce being sent back to the browser, although there might be a way to implement something like this.
</add>

aceskull

12:57 am on Jun 9, 2004 (gmt 0)

10+ Year Member



I seem to have a similar problem which just started recently. I am using apache2/php 4.3.7 and mysql on winxp pro. Just a localhost, no webserver just to run code on my local machine without having to upload.

Everything was working fine but all of a sudden My pages aren't displaying images at all. The home.html page is completely messed up, the images don't show and the background color doesn't come either. some of the code is being displayed as well. it only happens when I type [localhost...] or www.localmachine.loc

I uploaded it to a server to see if that happens there as well. It didn't. They are running apache2 as well. Error.log shows no errors, and access.log shows
127.0.0.1 - - [08/Jun/2004:20:38:25 -0400] "GET /Menu.htm HTTP/1.1" 304 -
127.0.0.1 - - [08/Jun/2004:20:38:25 -0400] "GET /Home.htm HTTP/1.1" 304 -
127.0.0.1 - - [08/Jun/2004:20:38:26 -0400] "GET /orbital001.jpg HTTP/1.1" 304 -

I thought I had some virus or something, so I scanned and found nothing, then I decided to do a fresh install that didn't help. I reformatted and tried again and that didn't help either. I am lost. I did do critical upgrades on IE6 but wouldn't that cuz these same problems when I look at on web server.

Azazel

1:42 pm on Jun 15, 2004 (gmt 0)

10+ Year Member



I think that Apache 2.0 is guilty of this, i'm getting similar errors with IE 6.0 or Netscape 4.7 on Xp Pro & Apache 2.0 or Fedora & Apache 2.0:

127.0.0.1 - - [15/Jun/2004:16:38:08 +0300] "GET /images/logo.gif HTTP/1.1" 304 0
127.0.0.1 - - [15/Jun/2004:16:38:08 +0300] "GET /images/arrow.gif HTTP/1.1" 206 295
127.0.0.1 - - [15/Jun/2004:16:38:08 +0300] "GET /images/content/homepage.gif HTTP/1.1" 206 22600
127.0.0.1 - - [15/Jun/2004:16:38:08 +0300] "GET /images/home1.gif HTTP/1.1" 304 0

I had similar problems with IE on various web servers (not loading all images before an ENTER on address bar after loading incompletely the pages) but that was random. Now, on Apache 2.0, i can't load (apparently) large images.