VideoCache
Videocache is no longer in development.

DEQUEUE_ERR - Error querying XMLRPC Server.

by eugenevdm on 4 Nov 2009

VideoCache seems unstable. Every few days it stops working. Today it stopped working again with the following being reported in the log:

2009-11-04 06:39:11,180 2342 - - RELOAD - videocache plugin was reloaded.
2009-11-04 06:39:11,180 2353 - - RELOAD - videocache plugin was reloaded.
2009-11-04 06:39:11,180 2349 - - RELOAD - videocache plugin was reloaded.
2009-11-04 06:39:11,182 2355 - - RELOAD - videocache plugin was reloaded.
2009-11-04 06:39:11,182 2343 - - RELOAD - videocache plugin was reloaded.
2009-11-04 06:39:11,183 2344 - - RELOAD - videocache plugin was reloaded.
2009-11-04 06:39:11,184 2345 - - RELOAD - videocache plugin was reloaded.
2009-11-04 06:39:11,185 2346 - - RELOAD - videocache plugin was reloaded.
2009-11-04 06:39:11,185 2347 - - RELOAD - videocache plugin was reloaded.
2009-11-04 06:39:11,185 2354 - - RELOAD - videocache plugin was reloaded.
2009-11-04 06:44:13,101 28894 - - DEQUEUE_ERR - Error querying XMLRPC Server.
2009-11-04 06:44:13,101 28894 172.17.205.236 bf7433fab79953ef DOWNLOAD YOUTUBE 4410634 Video was downloaded and cached.
2009-11-04 06:50:24,891 28766 - - DEQUEUE_ERR - Error querying XMLRPC Server.
2009-11-04 06:50:24,891 28766 172.17.222.56 ed44f37fdb4552a5 DOWNLOAD YOUTUBE 11793215 Video was downloaded and cached.
2009-11-04 06:53:09,840 28827 - - DEQUEUE_ERR - Error querying XMLRPC Server.
2009-11-04 06:53:09,841 28827 172.17.205.236 ce7cdc79b2adb8a3 DOWNLOAD YOUTUBE 17795540 Video was downloaded and cached.

Perhaps the advice is to restart Squid. We have over 700 people connected to Squid at once and doing a graceful restart is very disruptive to our clients.

We can kill Squid every time but we scared of the risks doing this. We don't want to intervene on our production network. Things must just work.

Has anyone come to the bottom of this error?

13 Answers

by Kulbir Saini on 4 Nov 2009

Hi!

Videocache rotate its logs automatically but it doesn't rotate squid's logs. Squid log rotation is known to affect videocache functionality especially the XMLRPC part. There are three solutions.

  1. You stop automatic rotation of squid logs and rotate them manually at low traffic times. But this may be painful if you have to do it a lot of times.
  2. [Not Tested] Add a line '/etc/init.d/squid reload' or 'service squid reload' to /etc/logrotate.d/squid file after squid rotates its logs i.e. after 'squid -k rotate' line. This may work.
  3. Restart squid after log rotation. It is similar to point 2 with the difference that instead of adding the line to reload squid, you'll have to add 'service squid restart' command to /etc/logrotate.d/squid file.

Thank You!

by vta on 4 Nov 2009

hi,

i did a manual log rotation "squid -k rotate" and i experienced the error XMLRPC. now i know it will affect videocache functionality...during the trouble i did kill all videocache.py's and restart squid. then no more error.

is it ok if i remove the file /etc/logrotate.d/squid? i will just run squid -k rotate manually then. after rotating squid logs, will restarting squid removes the XMLRPC error?

thanks,

vincent

by Kulbir Saini on 4 Nov 2009

Hi Vincent,

That should be fine I think. If you are comfortable in rotating the squid logs manually once in a while, /etc/logrotate.d/squid is not needed.

The solution you explain will work without any problem.

If you still face issues, please let us know in forums :)

Thank You!

by vta on 5 Nov 2009

hi,

the downloaded files or videos saved on my /var/spool/videocache/youtube have no extensions like .flv, etc.is this normal?

Thanks,

Vincent

by Kulbir Saini on 5 Nov 2009

Hi Vincent,

That normal. Don't worry about it :)

Thank You!

by vta on 6 Nov 2009

hi kulbir,

i sometimes get nothing on my videocache.log file...what should i do to see the logs? it will come out again when i restart squid, reload httpd...but i never tried update-vc? what could be the problem why videocache.log is empty?

thanks,

vincent

by Kulbir Saini on 7 Nov 2009

Hi Vincent!

That normally occurs when either XMLRPC server has gone away or it stops responding. Squid reload should do the job. Update-vc doesn't help in restarting squid or videocache.

Thank You!

by vincent on 8 Nov 2009

hi kulbir,

thanks for the reply. :)

When the videocache.log gets empty, does that mean videocaching has gone away also? because when i try view those cached videos again, my dowload speed increases up to 2mbps, a usual speed when i view cached youtube videos. a big difference when viewing never been cached videos...from that observation, i could still assume that the video im viewing is being served from cached. but i have no confirmation because i cant see the "cache_hit" inside the videocache.log :)

what i do, restart squid, killall all running python.py and reload httpd everyday...just to view logs in the videocache.log.

hey, i got a total of 5590 and increasing number youtube videos downloaded fro 1 week period. in a month period, im sure cache_hits will increase as the videos downloaded are rapidly increasing :)... after all, im still stuck as to what could be causing the XMLRPC server to stop working?

Thanks,

Vincent

by Kulbir Saini on 8 Nov 2009

Hi Vincent,

What is the avg load on your servers and how many clients do you have?

Thank You!

by vincent on 9 Nov 2009

hi kulbir,

avg load of squid = 5%
memory used by squid = 5%

now, i have a new problem, my set up is transparent proxy, when i turn on transparent proxy, it will become very slow...until u could hardly open a browser but no RTO when u ping to any wbsite.
my videocache directory reached to 80gigs already. i have an active clients right now of about 150 clients...yesterday it was very okay even the connected clients were 350 subs...im confused what could be causing this. i turned off the squid right now. im still looking for reasons why it gets so slow when i turn own the squid in transparent mode....please advise...

thanks,

vincent

by vincent on 9 Nov 2009

is it the videocache slowing my connection? for 1 week time, the directory of the videocache reached 80gigs already for almost 400 clients connected with average active numbers of 200, maybe.

thanks,

vincent

by Kulbir Saini on 9 Nov 2009

Hi Vincent,

Videocache need not be configured in different ways for transparent or non-transparent proxies. Please mail me your config files for squid and videocache.

Thank You!

by vincent on 11 Nov 2009

Hi Kulbir!

I made changes right away after receiving your reply mail. I monitored my server, the number of active clients reached to 200 at around 9pm. By 12MN, they’re only 185 and slowly decreases. But, by 1AM, my videocache.log again got empty  so I restarted squid. Im afraid il have to ask again why this is happening. Also, is there any means of limiting http request of clients. Because maybe lastime my squid got flooded by http request of a single client. Could it be done using iptables considering my setup as transparent proxy?

Thanks,

Vincent