{"id":1688,"date":"2015-01-27T23:37:07","date_gmt":"2015-01-27T23:37:07","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=1688"},"modified":"2015-01-27T23:37:07","modified_gmt":"2015-01-27T23:37:07","slug":"wowza-media-server","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2015\/01\/27\/wowza-media-server\/","title":{"rendered":"Wowza Media server"},"content":{"rendered":"<p>With wowza, sometimes java gets stuck and you can even run service WowzaMediaServer stop and start after it remain stuck until you properly kill java ( as you might know wowza it is running under java).<\/p>\n<p>This being said here we go ( tested on 2 ubuntu 12.04 environment with both wowza 3.6 and 4.0.3 versions)<\/p>\n<p># touch restart.sh <-- create the restart script\n# chmod 755 <-- make it writable\n# nano restart.sh < write commands to run it it\n\n[\/bash]\n\nThis is based on java we would like to kill java and not Wowza.\n\nWowza 2.2 up to 3.6.X version 1\n\n[bash]\n\n# nano restart.sh\n# kill -9 $(pidof java)\n# sleep 5\n# service WowzaMediaServer start\n\n[\/bash]\n\nPress control + X and Y and enter to save the file. If you are using Wowza 4.X or higher you should run this.\n\nWowza 4.X and higher version 2\n[bash]\n\n# kill -9 $(pidof java)\n# sleep 5\n# service WowzaStreamingEngine start\n# sleep 5\n# service WowzaStreamingEngineManager start\n\n[\/bash]\n\nPress control + X and Y and enter to save the file.\n\nFrom wowza 4.0 you know they also have the browser interface which is based also on java so that's why you need to start both EngineManager and Engine.\n\n\nNow each time when you want to restart wowza you can use the script like this :\n[bash]\n\n# .\/restart.sh\n\n\n[\/bash]\n\nMake a restart every night at 00:00 automatically ( i would do this to reset the garbage collector of java and free memory usage).\n\nAssuming you have the script in root create here we go.\n[bash]\n\n# crontab -e ( this will open crontab in your favorite editor)\n\n[\/bash]\n\nIf you never use crontab this will let you chose your editor.\nIf you before used an editor and now you want to change it you should type this for example for nano in ssh.\n[bash]\n\n# export EDITOR=nano\n\n[\/bash]\n\nNow you should type this on cron:\n[bash]\n\n# 00 00 * * * \/root\/restart.sh\n\n[\/bash]\n\nSave it and restart your cron service. \n\n[bash]\n# service crond restart\n[\/bash]\n\nNow you should be good about wowza restart.\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With wowza, sometimes java gets stuck and you can even run service WowzaMediaServer stop and start after it remain stuck until you properly kill java ( as you might know wowza it is running under java). This being said here we go ( tested on 2 ubuntu 12.04 environment with both wowza 3.6 and 4.0.3 &#8230; <a title=\"Wowza Media server\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2015\/01\/27\/wowza-media-server\/\" aria-label=\"Read more about Wowza Media server\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1688","post","type-post","status-publish","format-standard","hentry","category-applications"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/1688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=1688"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/1688\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=1688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=1688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=1688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}