Hi,
I have a customization that used to work in R2021 but is new throwing a “server has restarted” message since moving to R2022. This is on a local instance (2022.217.202.5231) and I have narrowed my code right down to the smallest steps to replicate the issue. This identifies that this appears to be the result of making an asynchronous API call from within a processing form.
So, my question is how should one make asynchronous calls from within a processing form and what is wrong with the code below (which was used to work on R2021)?
I have also found this link in my travels:
Here is the simplified code that produces the problem:
I have a processing form:
This is looping over a MASTRemoteExt DAC which has 44 records

And the TestAPI method in the MASTRemoteMaint Graph:
All this is doing is, for each remote record, making an asynchronous API call using HTTPClient and setting the LastUpdatedTime on the MASTRemoteExt record. I’m not currently doing anything with the result. Furthermore, I have identified that it’s lines 73,74 & 76 which are causing the error to be thrown. If these are commented out then no error.

This is what happens when the code above runs:
- Processing form before hitting Update All
- Code processes 19 of the 44 records and then throws “The server has been restarted. Please reload the page”
As mentioned above if lines 73,74 & 76 are commented out then there is no error, so I thin kit’s something about making the asynchronous call that’s causing the problem
- Code processes 19 of the 44 records and then throws “The server has been restarted. Please reload the page”
Thanks in advance for any help. I must have spent a good 5 hours trying to resolve this yesterday without any success..
Thanks,
John.