<div dir="ltr">Try setting up a default handler as explained on page 264-265 of the 3.6 Programming Guide (section titled "Default Handlers"), using something like:<div><br></div><div>AlmostOutOfMemoryError addDefaultHandler: [:ex |<br> < your code here ><br> AlmostOutOfMemoryError enable.<br> ex resume].<br>AlmostOutOfMemoryError enable.<br><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">------------------------------------------------------------------------<br>Bill Erickson <br>GemTalk Systems Engineering<br>15220 NW Greenbrier Parkway #240, Beaverton OR 97006<br>------------------------------------------------------------------------<br></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 2, 2022 at 5:17 AM Otto Behrens via Glass <<a href="mailto:glass@lists.gemtalksystems.com">glass@lists.gemtalksystems.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>We are getting OutOfMemory errors in a seaside request handler because we are doing something ridiculous. We will fix that problem, but I'd like to handle the out of memory situation better because currently our sessions do not report that it did go out of memory, because it is unable to, for obvious reasons.</div><div><br></div><div>I was thinking of enabling AlmostOutOfMemory and then report the error like we do with other exceptions: write a stack trace to the logs, send an email message and then redirect to an error page.</div><div><br></div><div>I called</div>System enableAlmostOutOfMemoryError<div>in my Seaside application initialization, which did not work. </div><div>I then tried it in my session startup script (similar to the seaside/bin/startSeaside_FastCGI script) and it also did not work.</div><div><br></div><div>I just get the same old OutOfMemory fatal error.</div><div><br></div><div>I tried adding this to my error handler:</div><div>handleException: anException<br> ^ (AlmostOutOfMemory handles: anException)<br> ifTrue: [ System enableAlmostOutOfMemoryError.<br> self handleError: anException ]<br> ifFalse: [ (Notification handles: anException)<br> ifTrue: [ super handleException: anException ]<br> ifFalse: [ self handleError: anException ] ]<br></div><div><br></div><div>Any ideas?</div><div><br></div><div>Kind regards<br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><table width="600" cellpadding="0" cellspacing="0" border="0" style="color:rgb(0,0,0);font-family:Times;font-size:medium"><tbody><tr><td width="400" valign="bottom"><p style="margin:0px;padding:0px"><span style="font-size:18px;color:rgb(146,148,151);font-family:Calibri,sans-serif;font-weight:700">Otto Behrens</span><br></p><p style="font-size:18px;font-weight:700;color:rgb(146,148,151);font-family:Calibri,sans-serif;margin:0px;padding:0px"><span style="font-size:14px;font-weight:300;margin:0px;padding:0px">+27 82 809 2375</span></p></td><td width="200" valign="middle"><img src="https://www.finworks.biz/signature/finworks-signature-logo.png" width="200" height="38" alt="FINWorks" style="display: block; border: 0px; width: 200px; height: 38px; margin: 0px; padding: 0px;"></td></tr></tbody></table><table width="600" cellpadding="0" cellspacing="0" border="0" style="color:rgb(0,0,0);font-family:Times;font-size:medium"><tbody><tr><td height="5"></td></tr></tbody></table><table width="600" cellpadding="0" cellspacing="0" border="0" style="color:rgb(0,0,0);font-family:Times;font-size:medium;border-bottom:1px solid rgb(200,28,36)"><tbody><tr><td height="15"></td></tr></tbody></table><table width="600" cellpadding="0" cellspacing="0" border="0" style="color:rgb(0,0,0);font-family:Times;font-size:medium"><tbody><tr><td height="20"></td></tr></tbody></table><table width="600" cellpadding="0" cellspacing="0" border="0" style="color:rgb(0,0,0);font-family:Times;font-size:medium"><tbody><tr><td width="15" valign="top" style="display:inline-block"><a href="http://za.linkedin.com/in/waltherbehrens" style="color:rgb(17,85,204)" target="_blank"><img src="https://www.finworks.biz/signature/finworks-linkedin-logo.png" width="15" height="15" alt="FINWorks" style="display: inline-block; border: 0px; width: 15px; height: 15px; margin-top: 1.5px; padding: 0px;"></a></td><td width="250" valign="top" style="display:inline-block"><a href="http://www.finworks.biz/" style="color:rgb(200,28,36);font-family:Calibri,sans-serif;margin-left:10px;margin-top:0px;padding-top:0px;font-size:11pt;display:inline-block" target="_blank">www.finworks.biz</a></td></tr></tbody></table><table width="600" cellpadding="0" cellspacing="0" border="0" style="color:rgb(0,0,0);font-family:Times;font-size:medium"><tbody><tr><td height="10"></td></tr></tbody></table><table width="600" cellpadding="0" cellspacing="0" border="0" style="color:rgb(0,0,0);font-family:Times;font-size:medium"><tbody><tr><td><p style="font-size:10px;color:rgb(146,148,151);font-family:Calibri,sans-serif;text-align:justify">Disclaimer & Confidentiality Note: This email is intended solely for the use of the individual or entity named above as it may contain information that is confidential and privileged. If you are not the intended recipient, be advised that any dissemination, distribution or copying of this email is strictly prohibited. FINWorks cannot be held liable by any person other than the addressee in respect of any opinions, conclusions, advice or other information contained in this email.</p></td></tr></tbody></table></div></div></div></div></div></div></div>
_______________________________________________<br>
Glass mailing list<br>
<a href="mailto:Glass@lists.gemtalksystems.com" target="_blank">Glass@lists.gemtalksystems.com</a><br>
<a href="https://lists.gemtalksystems.com/mailman/listinfo/glass" rel="noreferrer" target="_blank">https://lists.gemtalksystems.com/mailman/listinfo/glass</a><br>
</blockquote></div>