You are not logged in.
Pages: 1
Hello!
In a method of an interface based service I get an 'Out of Memory' error when an out RawUTF8 parameter gets too large.
How can I tell the client that such error occurred? Because it happens after my method exited.
What is the proper size for such parameter to return?
Last edited by polidados (2017-09-06 21:24:31)
Offline
All parameter values will be serialized as JSON during SOA calls. So you would need twice the RAM as the raw content. Note also that BLOBs are base-64 encoded, so it is more than twice the RAM for them.
So you should better stay in a reasonable size, e.g. a few MB.
If you expect to send big information to a server, consider paging your content into smaller pieces.
If you expect to receive big information from a server, consider using TServiceCustomAnswer kind of answer - and also that you could efficiently return a file content without any memory copy (under http.sys).
You may also consider method-based services, if you want full access to the remote HTTP request.
Or you may also compile the server in 64-bit mode, if you have enough RAM to hold all the info at once.
But IMHO it is not a good idea, due to network limitations, since the process will be blocking for a long time, from the client side.
Offline
Ok. I'll see what is best for my case based on your input.
Thank you, ab!
Offline
Pages: 1