You are not logged in.
Pages: 1
Why use SyNode in the ISAPI to Create the Create runtime: out of memory?
But SM24 doesn't.
MyCode
procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
fEngineManager := TSMEngineManager.Create('');
try
fEngine := fEngineManager.ThreadSafeEngine(nil);
Response.Content :=
'<html>' +
'<head><title>Web Server Application</title></head>' +
'<body>Web Server Application</body>' +
'</html>';
fEngineManager.ReleaseCurrentThreadEngine;
finally
fEngineManager.Free;
end;
end;
Offline
error code is
frt := PJSRuntime(nil).New(FManager.MaxPerEngineMemory, $01000000, nil);
if frt = nil then
raise ESMException.Create('Create runtime: out of memory');
frt is nil
Offline
I think your ISAPI thread pull is too large. In any case create a new engine manager and engine for every request is overhead. SyNode engines creation is slow, because we consider it should be created only once per thread, not per request as in your sample
Offline
Thank you. If you create an engine in advance, you might want to create an object pool.
Offline
Pages: 1