<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Matthias,<br>
<br>
I had a problem with the Pika connection negotiation behavior which
is leading to a situation where the heartbeat interval has a maximum
possible value of 600s. The problem i had is the following,<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<p style="margin: 15px 0px; padding: 0px; border: 0px; color:
rgb(51, 51, 51); font-family: Helvetica, arial, freesans, clean,
sans-serif; font-size: 13px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
22px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(251, 251, 251);">I am using pika 0.9.9 with
RabbitMQ 3.0.3. Few of the consumers we have are long running, so
I would want to have a long heartbeat_interval so that the
connections are not removed from either side. But the network
infrastructure will not allow long idle connections so I wanted to
set the heartbeat interval to 3600s(assuming pika is single
threaded and can analyze the heartbeat events only between
requests). But when I check the Timeout value in the RMQ
Management page, I see it set only to 600.</p>
<p style="margin: 15px 0px; padding: 0px; border: 0px; color:
rgb(51, 51, 51); font-family: Helvetica, arial, freesans, clean,
sans-serif; font-size: 13px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
22px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(251, 251, 251);">Any number i try in the
range of (300-600) works but above 600, it somehow defaults to
600. I think I didnt have this problem with RMQ 2.8. I am using
php-amqplib for other piece of code and it is able to set
heartbeat_interval to 3600s with RabbitMQ 3.0.3. My usage of
creating a conncetion is as follows:</p>
<br class="Apple-interchange-newline">
and my thoughts on why there shouldnt be a maximum value for
heatbeat interval is the following,<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<span style="color: rgb(51, 51, 51); font-family: Helvetica, arial,
freesans, clean, sans-serif; font-size: 13px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 22px; orphans: auto; text-align: start; text-indent:
0px; text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(251, 251, 251); display: inline !important;
float: none;">I think the heartbeat interval should be flexible
enough for different type of workers. For example, we have a
combination of long-running tasks and short-running tasks. The
short running tasks range from 1 to 10 seconds. The long running
tasks can take anytime depending on the input video size. So, for
long running tasks, if the heartbeat interval set is 10 minutes,
the client will not respond to the server's heartbeat for a long
time which will result in the server disconnecting the client. Now
the problem for disabling the heartbeat is the network
infrastructure (like EC2) will kill any connections which are idle
for more than about a day(dont know the exact time). So if the
heartbeat is disabled then the connections are gone for good. An
application can have a variety of load patterns, mine being short
bursts with long idle time. So I think the heartbeat should be
flexible enough to support a variety of consumers and different
network infrastructures.<br>
<br>
<big><font face="sans-serif">Please let me know your thoughts on
this so that there could be a possible change in the client's
connection behavior<br>
<br>
<big><small>regards,<br>
Maitreya<br>
<br>
</small></big></font></big></span>
</body>
</html>