<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Will,</p>
<p>It turns out the problem had to do with a mismatch in the client
and server versions. I was using a 5.2.5 client with a 5.1.4
server. The actual problem was a memory exception (when I match
client and server version) which is proving harder to resolve than
I thought. I've asked this question before on this mailing list
and I think I resolved that case. <br>
</p>
<p>But right now setting Ice.MessageSizeMax does note seem to have
any effect.</p>
<p>I've used:</p>
<p>bin/omero config edit (then added Ice.MessageSizeMax=131072; I've
also done this using bin/omero config set Ice.MessageSizeMax
131072)<br>
</p>
<p>and edited both etc/ice.config and etc/grid/templates.xml files
for both client and server with no effect. All I keep getting is a
data dump and:</p>
<p>Traceback (most recent call last):<br>
File
"/Users/pkorir/omero/OMERO.py-5.1.4-ice35-b55/lib/python/omero/gateway/__init__.py",
line 4160, in __call__<br>
return self.f(*args, **kwargs)<br>
File
"/Users/pkorir/omero/OMERO.py-5.1.4-ice35-b55/lib/python/omero_api_IUpdate_ice.py",
line 107, in saveObject<br>
return _M_omero.api.IUpdate._op_saveObject.invoke(self, ((obj,
), _ctx))<br>
MemoryLimitException: exception ::Ice::MemoryLimitException<br>
{<br>
reason = requested 83930389 bytes, maximum allowed is 67108864
bytes (see Ice.MessageSizeMax)<br>
}<br>
</p>
<p>Any help will be gratefully received.</p>
<p>Paul<br>
</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 01/05/2017 13:15, William Moore
(Staff) wrote:<br>
</div>
<blockquote type="cite"
cite="mid:04D0B79A-690B-4B89-93A3-896BF65CB0A6@dundee.ac.uk">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
Hi Paul,
<div class=""><br class="">
</div>
<div class="">I used the tiny script below to test what you’re
seeing….</div>
<div class=""><br class="">
</div>
<div class="">First I set the session timeout to 10 seconds:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-family: Courier; color: rgb(76,
47, 45); background-color: rgb(223, 219, 196);" class="">
$ bin/omero config set omero.sessions.timeout 10000</div>
</div>
<div class=""><br class="">
</div>
<div class="">Then I ran the script to see if the
conn.c.enableKeepAlive(5) would allow me to </div>
<div class="">perform other calls that lasted longer than 10
seconds, such as time.sleep(15).</div>
<div class=""><br class="">
</div>
<div class="">This seems to work.</div>
<div class="">I think you may have your keepAlive interval longer
than the session timeout?</div>
<div class="">This is confusing since the session timeout is in
milliseconds but the</div>
<div class="">keepAlive interval is in seconds, so it’s easy to
accidentally set the keepAlive</div>
<div class="">to be too long (longer than the session timeout).</div>
<div class=""><br class="">
</div>
<div class="">In the example below, if I use
conn.c.enableKeepAlive(50)</div>
<div class="">then I see the same as you "warning: Proxy keep
alive failed.”</div>
<div class="">because this is longer than 10 seconds (<span
style="color: rgb(76, 47, 45); font-family: Courier;
background-color: rgb(223, 219, 196);" class="">omero.sessions.timeout
10000)</span></div>
<div class=""><br class="">
</div>
<div class="">Hopefully that was the problem?</div>
<div class="">If not, you’ll need to show us more of your code, or
a sample script that</div>
<div class="">replicates the problem, and say what your session
timeout is.</div>
<div class=""><br class="">
</div>
<div class=""> Regards,</div>
<div class=""><br class="">
</div>
<div class=""> Will.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">from omero.gateway import BlitzGateway</div>
<div class=""><br class="">
</div>
<div class="">conn = BlitzGateway(“username", “password",
host="localhost", port=4064)</div>
<div class="">conn.connect()</div>
<div class=""><br class="">
</div>
<div class=""># Ping interval in SECONDS - KeepAlive Interval
must be shorter than </div>
<div class=""># omero config set omero.sessions.timeout 10000</div>
<div class=""># which is in MILLISECONDS</div>
<div class="">conn.c.enableKeepAlive(5)</div>
<div class=""><br class="">
</div>
<div class="">print "start..."</div>
<div class="">time.sleep(15)</div>
<div class=""><br class="">
</div>
<div class="">print
conn.c.sf.getAdminService().getEventContext().userName</div>
<div class=""><br class="">
</div>
<div class="">conn.close()</div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 27 Apr 2017, at 14:04, Paul Korir <<a
href="mailto:pkorir@ebi.ac.uk" class=""
moz-do-not-send="true">pkorir@ebi.ac.uk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<p class="">By the way, the keepalive gave the
following:</p>
<p class="">-! 04/27/17 12:07:15.006 warning: Proxy keep
alive failed.</p>
<br class="">
<div class="moz-cite-prefix">On 26/04/2017 11:16,
William Moore (Staff) wrote:<br class="">
</div>
<blockquote type="cite"
cite="mid:061C29A5-B2E3-4919-9692-D9A744CAC7EB@dundee.ac.uk"
class="">
Hi Paul,
<div class=""><br class="">
</div>
<div class="">
<div class=""> You can enable the keepAlive on the
client object with</div>
<div class="">conn.c.enableKeepAlive(300)</div>
<div class="">See 5.2 docs: <a
href="https://downloads.openmicroscopy.org/omero/5.2.0/api/omero/client.html#enableKeepAlive-int-"
class="" moz-do-not-send="true">
https://downloads.openmicroscopy.org/omero/5.2.0/api/omero/client.html#enableKeepAlive-int-</a> </div>
<div class=""><br class="">
</div>
<div class="">Also you can set this in the
etc/omero.properties file.</div>
<div class="">See discussion at <a
href="https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=495"
class="" moz-do-not-send="true">
https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=495</a>
</div>
</div>
<div class=""><br class="">
</div>
<div class="">Hope that helps,</div>
<div class=""><br class="">
</div>
<div class=""> Will.</div>
</blockquote>
<br class="">
<pre class="moz-signature" cols="72">--
Paul K. Korir, PhD
Scientific Programmer
EMBL-EBI
01223494422</pre>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a
registered Scottish Charity, No: SC015096</span>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Paul K. Korir, PhD
Scientific Programmer
EMBL-EBI
01223494422</pre>
</body>
</html>