Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Image load failure, media wont play |
|
Author |
|
mattS
Joined: 03 Jul 2020 Posts: 2 Location: Redwood city
|
Posted: Sun 05 Jul '20 5:41 Post subject: Image load failure, media wont play |
|
|
I am new to using apache and I ran into a issue and anyone who can help point me in the right direction would be greatly appreciated.
I am running apache 2.4.6 on centos7.
Here is a log snippet,
GET /css/vids/mov-data.mp4 HTTP/1.1" 404 219
GET /css/vids/mov-data.mp4 HTTP/1.1" 206 45403324
The some of the video and images are not loading. There is a video and it will load a few frames then freeze, there is another video on another page and it loads and plays fine. There is also a page where a few images will load but others will not.
Could it be a size issue, or a header range, or keep alive issue.
Thanks for any help. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sun 05 Jul '20 22:12 Post subject: |
|
|
GET /css/vids/mov-data.mp4 HTTP/1.1" 404 219
404 is file not found
/css/vids/mov-data.mp4 HTTP/1.1" 206 45403324
206 is partial which is most often due to the range header.
Here's the rub, Apache used to have EnableSendfile on by default (1.3/2.x/2.2) but it was changed for 2.4. Every request it serves is now buffered in memory before being sent over the wire. This can affect large files being served.
I deal with large files by having them served with EnableSendfile turned On but only for those. In a global area of my config I have
Code: | <Files ~ "\.(flv|iso|mp4)$">
EnableSendfile On
</Files>
|
That works for me. You can also make Apache send it in one piece, not multiple, by also adding MaxRanges 1 to the above example
Code: | <Files ~ "\.(flv|iso|mp4)$">
EnableSendfile On
MaxRanges 1
</Files>
|
|
|
Back to top |
|
mattS
Joined: 03 Jul 2020 Posts: 2 Location: Redwood city
|
Posted: Mon 06 Jul '20 3:11 Post subject: |
|
|
Thank you for the response,
I reloaded apache and i'm still getting the issue
I entered the code snippet into the httpd.conf file at the line numbers listed below. Did I enable it properly
113 <Files ~ "\.(flv|iso|mp4)$">
114 EnableSendfile On
115 MaxRanges 1 116 </Files>
350 EnableMMAP on
351 EnableSendfile on
352 MaxRanges 1
As well I ran httpd -V, and I got Server compiled with....
dose this mean that send file is enabled.
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
If you want to take a look at it, here is the web site http://mattshig.com/index.html |
|
Back to top |
|
|
|
|
|
|