Cron Job

Read 15342 times
I had noticed every once in a while the current tracks, listener count, host connection seemed to go down, although my streams have never stopped yet. WHen this happened I restarted Centova and the problem was gone.
I also notice the current listener page does not refresh unless I restart Centova

I have set up a cron job to run every hour and all seems fine now, but the listener stats page also only refreshes only once a hour now, but other than that all seems fine now, is it ok to run this cron once a hour?

0 * * * * /etc/init.d/centovacast restart -- restarts Centova Cast
My Auto DJ
Orlando, FL USA
Quality SHOUTcast Hosting http://myautodj.com
SHOUTcast Widgets http://shoutcastwidgets.com
I had noticed every once in a while the current tracks, listener count, host connection seemed to go down
Go down as in... reduce in number?  Or go down as in... somehow stop working?  (If the latter, please explain how.)

I also notice the current listener page does not refresh unless I restart Centova
Do you mean that the stats don't update in realtime unless you restart it?  Or do you mean that even if you refresh the page in your browser, the statistics still don't update?

FWIW, I can't reproduce either of these issues.

is it ok to run this cron once a hour?
As a temporary workaround, sure, but I wouldn't rely on it as sooner or later it's going to start to impact clients -- any HTTP requests in progress when the restart is performed will be interrupted.

It's very rare only happened a handful of times but have not see it since I added the cron, but if it does again I will take a screenshot, sorry forgot to do that :(

Would the fact I have different versions of sc_serv (June 2012)  have any reason to do with the fact you cannot reproduce the problem? I think the one you have in your package is from 2011, not sure if you had updated that yet but that may explain why I have having odd problems such as this.

I do know the current listener page worked after the latest update you put up about 2 weeks ago, only after I changed the sc_serv file did I have other problems, it correct my YP hash problems though, that part has been fine ever since.

Again this is very minor, still the server is running very low loads and has not went down yet
My Auto DJ
Orlando, FL USA
Quality SHOUTcast Hosting http://myautodj.com
SHOUTcast Widgets http://shoutcastwidgets.com
Local server   Cluster host connection failure for Local server: Connection refused (111)

seems the more accounts I add the more likely it is to happen, adding more resources to the server now but it appears the system was running out of RAM, would that cause this?
Last Edit: June 26, 2012, 08:25:11 am by My Auto DJ
My Auto DJ
Orlando, FL USA
Quality SHOUTcast Hosting http://myautodj.com
SHOUTcast Widgets http://shoutcastwidgets.com
It's very rare only happened a handful of times but have not see it since I added the cron, but if it does again I will take a screenshot, sorry forgot to do that :(
OK, thanks!

Would the fact I have different versions of sc_serv (June 2012)  have any reason to do with the fact you cannot reproduce the problem?
I wouldn't think so, but it's impossible for me to say for sure -- if you're using some kind of pre-release version from Nullsoft, it's impossible to know what they may have changed.

I think the one you have in your package is from 2011, not sure if you had updated that yet but that may explain why I have having odd problems such as this.
We don't bundle any version of sc_serv2 in our packages (that's against Nullsoft's license agreement) -- our installer detects and downloads the latest one from nullsoft.com at installation time.  The August 2011 release is the latest public sc_serv2 release available... if you're using something newer, it's not available to the rest of us. :)
OK sorry I always thought it was all the same package, however I do think the problem was just not enough memory, I doubled my server resources and have been adding streams and messing with it all day since and it has not happened yet. What would the min. server requirements be, I would have to say at least 2G memory it does seem to use a lot more, but now my server load is almost not even reading it's so low :)
My Auto DJ
Orlando, FL USA
Quality SHOUTcast Hosting http://myautodj.com
SHOUTcast Widgets http://shoutcastwidgets.com
It depends on how many streams you're hosting, what other software is also running on the machine, etc., but in general 2GB should be much more than enough.

Every server will be different, but just as an example, on my main dev server I'm currently seeing:

cc-control: 13M shared + 1M private = 14M
cc-appserver: 30M shared + 5x12M private + 1x4M private = 94M
cc-web: 20M shared + 2+1+1M private = 24M
cc-ftpd: 14M
cc-imaged: 33M shared + 4x1M = 37M

Total for Centova Cast: 183M

For ShoutCast2:

sc_serv: 43M shared + 6M per process
sc_trans: 139M shared + 10M per process

For IceCast:

icecast: 70M shared + 3M per process
ices-cc: 25M shared + 2.3M per process

So based on the above, say I had 20 ShoutCast servers running with sc_trans, I'd be using a total of about 183M + 43M + 139M + (6+10) x 20 = 685M of RAM.

In terms of memory utilization alone (ignoring CPU and network limitations), factor in, say, 100MB for the kernel and system applications, and you could host about 100 streams in 2GB of RAM using sc_trans+sc_serv, or 300 streams with IceCast/ices-cc, before you ran out of memory.