<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body dir="ltr" bgcolor="#ffffff" text="#000000">
<p style="margin-bottom: 0cm; margin-top: 0pt;">I use a virtual host
and created a user that got access to the vhost and have "all" access
to the queue.<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">This is some partial
code of the publish part:<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">==================<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">MapMessageBuilder
mapMessageBuilder = new MapMessageBuilder(ch);<br>
mapMessageBuilder.Properties.DeliveryMode = 2;<br>
<br>
foreach (KeyValuePair<string, object> pair in data) {<br>
if (pair.Value != null) {<br>
if (IsSupportedType(pair.Value.GetType())) {<br>
mapMessageBuilder.Body.Add(pair.Key, pair.Value);<br>
} else {<br>
throw new ApplicationException(string.Format("Parameter
named \"{0}\" of type \"{1}\" is not supproted as a valid value.",
pair.Key, pair.Value.GetType().Name));<br>
}<br>
}<br>
}<br>
<br>
ch.BasicPublish(ticket, string.Empty, string.Empty,
mapMessageBuilder.GetContentHeader() as IBasicProperties,
mapMessageBuilder.GetContentBody());</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">=======================<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">I use the
MapMessageBuilder to add only simple types (strings, int, dates, etc -
that's what the IsSupportedType checks) and publish it to a persistent
queue.</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">This is what the web
servers use to publish various actions to the queue.</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">On the other end I have
a dedicated service that among other things accesses the queue to get
the items published and perform various things according to the data
sent.</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">The code there looks
something like this:</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">===================</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">result =
ch.BasicGet(ticket, queueName, false);<br>
if (result != null) {<br>
try {<br>
ch.BasicAck(result.DeliveryTag, false);</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"> .</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"> . do some work </p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"> .</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"> catch (Exception ex) {</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"> If we had a
problem figure what it was, promote a counter on the job itself and
submit it back to the queue (after X tries we will not resubmit it back)<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"> }<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">==================</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">The publish code keeps
on working correctly while the BasicGet code, on the BasicGet call gets
the 541 error.<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">When all of this
started to happen I delete the content of the DB folder, recreated
everything (including redefining the user, vhost and durable queue) and
restarted the app again. </p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">It worked for a while
but kept on happening again. I have a snapshot of all the files but the
persister is about 180MB (which seems to be its average size).<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">Now it runs for about
12 hours through the command line (not erlsrv) and so far it seems ok.</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">The memory jumps up and
down reaching ~500-600mb and sometimes dropping back to 100mb and going
straight up to 500-600mb. Currently its ~300Mb.<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">Eran<br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<p style="margin-bottom: 0cm; margin-top: 0pt;">Ben Hood wrote:</p>
<blockquote
cite="mid:269388e30809110347o7ba89312y5fec995035cddaab@mail.gmail.com"
type="cite">
<pre wrap="">Eran,
On Wed, Sep 10, 2008 at 2:06 PM, Eran Sandler <a class="moz-txt-link-rfc2396E" href="mailto:eran.sandler@gmail.com"><eran.sandler@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">The only thing I get is this:
=ERROR REPORT==== 10-Sep-2008::05:17:39 ===
error on TCP connection <0.337.0> from 10.23.43.15:1193
connection_closed_abruptly
=INFO REPORT==== 10-Sep-2008::05:17:39 ===
closing TCP connection <0.337.0> from 10.23.43.15:1193
I see the connection created, accepted and then this error.
I have a bunch of web server issuing data into the queue, they never get an
error.
I have a dedicated process that reads info from the queue. It connects ones
and keeps on reading data (no subscription).
That connection alone is making the problem. Since it gets an error I open a
new connection and model for it and it works a bit but then dies.
The 541 error has no cause, as you can see.
</pre>
</blockquote>
<pre wrap=""><!---->
This is strange. 541 is a general internal error which would get
logged to the server log under normal circumstances.
Could you send a condensed version of your code that can help us
reproduce this please?
A 541 error will also cause the broker to close both the channel and
the connection to the client.
</pre>
<blockquote type="cite">
<pre wrap="">In addition to that, I have a lot of the following errors:
=ERROR REPORT==== 10-Sep-2008::05:17:39 ===
Lax ticket check mode: ignoring cross-realm access for ticket 0
Though I think they are not related.
</pre>
</blockquote>
<pre wrap=""><!---->
No, this is just a cosmetic bug in 1.4.0 which has been fixed in the
mainline code and will not be there in the next release.
HTH,
Ben
</pre>
</blockquote>
<br>
</body>
</html>