Le Wednesday 19 September 2007 19:07:46 Vincent Tabard, vous avez écrit :
> * with restart = false, liq doesn't try to reconnect when the connection
> goes down. This behavior should definitely not be kept as a default,
> above all when you consider that liq doesn't stop or anything (even if
> no other output is defined): it just goes on with no output, sometimes
> appearing to try to reconnect ("Shout socket error..."), never
> successful. Worse, it eats 100 % CPU.
I've tried it and I get:
"2007/09/21 01:11:58 [test:2] Shout socket error: timeout, network failure,
server shutdown? Restarting the output...
2007/09/21 01:11:58 [test:3] Connecting mount test for [EMAIL PROTECTED]
2007/09/21 01:11:58 [test:2] Unable to connect to icecast server
localhost:8005!"
Could you try if included patch helps by adding the same restart_delay to this
case.
> * with restart = true, things ain't much better. Liq sees disconnects
> when everything is OK (other TCP connections don't seem affected by any
> problem. maybe some dropped packets, but the connections generally hold,
> and TCP can cope with lost packets). It sometimes drop the connection to
> the Icecast server and eats 100 % CPU (see: http://paste.balbinus.org/135).
Seems related to previous issue, please try with the patch above too..
Romain
--
In the beginning, there was but one concept,
And that's the concept of I.
Then arose Apollyon, the Devil
- Satan! Satan! -
claiming that it's you and I.
And from that day on,
There was trouble in the world
Index: src/outputs/icecast2.ml
===================================================================
--- src/outputs/icecast2.ml (révision 4610)
+++ src/outputs/icecast2.ml (copie de travail)
@@ -96,8 +96,6 @@
method send b =
match connection with
| None ->
- (* This should not happen when "restart" is disabled. *)
- assert restart ;
if Unix.time () > restart_delay +. last_attempt then begin
(* TODO The base output class ensures that start is called before
* send, and stop after them. This is broken if send calls
@@ -119,13 +117,14 @@
Shout.send c b
with
| Shout.Socket ->
- self#log#f 2 "%s"
- ("Shout socket error: timeout, network failure, "^
- "server shutdown? Restarting the output...") ;
- (* Ask for a restart before next send round. *)
- stop_output <- true ;
- start_output <- true
- end
+ self#log#f 2 "%s%s %.f sec"
+ "Shout socket error: timeout, network failure, "
+ "server shutdown? Restarting the output in "
+ restart_delay ;
+ (* Ask for a restart after last_attempt. *)
+ self#output_stop ;
+ last_attempt <- Unix.time ()
+ end
method output_stop =
match connection with