Results 1 to 3 of 3

Thread: Tutorial : How to keep Wowza alive

  1. #1

    Default Tutorial : How to keep Wowza alive

    I use wowza 3 for heavy vod system. 2 running as mediacaches server and sometime one of the server will die. If checked with WowzaMediaServer status, it will return started. So here's my solution.

    1. Check the server status by using curl for example:

    curl -I "http://localhost/vod/mp4:sample.mp4/chunklist.m3u8"
    HTTP/1.1 200 OK
    Date: Sat, 19 Jul 2014 02:46:03 GMT
    Content-Type: application/
    Server: FlashCom/3.5.7
    Cache-Control: no-cache
    Content-Length: 2828
    What the information I need from curl is 1st return query "HTTP/1.1 200 OK"

    So easily I can do simple programming using PHP to check the server health

    location: /root/check_wowza.php
    $url = "http://localhost:1935/vod/mp4:sample.mp4/chunklist.m3u8"; // default sample.mp4 wowza
    $s = @get_headers($url);
    if($s == FALSE ){
            //server down
            //echo 'down';
    } else {
            if($s[0] != 'HTTP/1.0 200 OK'){
    The script will check if the server alive or not. If not, it will trigger another script located at /root/

    /usr/bin/killall java
    sleep 5
    /sbin/service WowzaMediaServer start
    Make sure to chmod +x all scripts

    now we can test the scripts by running via command line

    /usr/bin/php -q /root/check_wowza.php
    If it's running perfectly, put into cron job and set it run for every 5 minutes, type crontab -e
    */5 * * * * /usr/bin/php -q /root/check_wowza.php
    Hopefully this little snippets works for your needs..especially when you're lone SystemAdmin with hundreds of servers

    @botakchin | Human Alliance | Gundrak PVP

  2. #2
    Join Date
    Sep 2011


    It's great to see the Wowza community sharing useful tips and code to help each other out.
    Thank you so much for posting.


  3. #3
    Join Date
    Apr 2014


    thanks for sharing this helpful tutorial!

Similar Threads

  1. "Keep Alive" Streams (Cube -> Wowza -> vMix)
    By davesuemcbride in forum Live Streaming and Encoder Discussion
    Replies: 3
    Last Post: 05-21-2013, 03:11 PM
  2. wowza Security Developer Wanted Dead or Alive
    By visualjobs in forum General Forum
    Replies: 2
    Last Post: 08-02-2012, 10:01 AM
  3. How to Keep HTTP streaming alive?
    By microvideo in forum Live Streaming and Encoder Discussion
    Replies: 5
    Last Post: 10-27-2011, 07:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts