[Glass] out of memory error

Otto Behrens otto at finworks.biz
Wed Feb 2 05:17:20 PST 2022


Hi,

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.

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.

I called
System enableAlmostOutOfMemoryError
in my Seaside application initialization, which did not work.
I then tried it in my session startup script (similar to the
seaside/bin/startSeaside_FastCGI script) and it also did not work.

I just get the same old OutOfMemory fatal error.

I tried adding this to my error handler:
handleException: anException
^ (AlmostOutOfMemory handles: anException)
ifTrue: [ System enableAlmostOutOfMemoryError.
self handleError: anException ]
ifFalse: [ (Notification handles: anException)
ifTrue: [ super handleException: anException ]
ifFalse: [ self handleError: anException ] ]

Any ideas?

Kind regards

Otto Behrens

+27 82 809 2375
[image: FINWorks]
[image: FINWorks] <http://za.linkedin.com/in/waltherbehrens>
www.finworks.biz

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/archives/glass/attachments/20220202/f43f0a7b/attachment.htm>


More information about the Glass mailing list