Question
· Oct 8, 2019

<INVALID OREF> error and any means to avoid this error

Hi All,

 

I am encountered <INVALID OREF> error in one of the components in the namespace as we are processing and generating huge files and sending them to downstream systems. One possible way we tried was to allocate more memory for the namespace in ensemble, but this kind of intermittent error still occurred only if processing the huge files. Also we tried to resend the failed message and the error would be gone. Another possible solution is to kill unused local variables to release memory space. My question is that what is more efficient way to deal with OREF error related to memory allocation issue? Could we also set up the retry mechanism to resend the failed messages if this error happens to the messages? Any insights or suggestion is highly appreciated. Looking forward to the replies. Thanks so much.

Discussion (2)0
Log in or sign up to continue

Honestly, I never saw an <INVALID OERF> related to a lack of memory.

It typically happens if you do set obj=##class(MyClass).%OpenId(id,,.status)  and do not check for success.

https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25Library.Persistent#METHOD_%OpenId

so if you miss if '$isobject(obj)  {  .... error processing  using status....} or similar

then the next access to obj.MyProperty will throw  <INVALID OERF>

Only checking the status will tell you if  you really ran out of memory