#1 2025-08-01 14:10:43

Prometeus
Member
From: USA
Registered: 2020-11-20
Posts: 56

Problem with TSynLog and TRestHttpServer after commit 2.3.11795

I am not sure if this problem started exactly on this commit, but the following code was working before it, and now it fails:

  LogFamily := TSynLog.Family;
  with LogFamily do
    begin
      Level := LOG_VERBOSE;
      EchoToConsole := [sllNone];        
      LocalTimestamp := true;
      PerThreadLog := ptIdentifiedInOneFile;
    end;
...
  HttpOptions := [rsoOnlyJsonRequests, rsoEnableLogging, rsoIncludeDateHeader, rsoCompressSynLZ, rsoCompressGZip];
  AHttpServer := TRestHttpServer.Create('8080', [ARestServer], '+', HTTP_DEFAULT_MODE, 32, secNone, '', '', HttpOptions, nil);  

Right after calling 'TRestHttpServer.Create' I get the error: 'HttpQueryUrlGroupProperty() failed: ERROR_MORE_DATA (234)' on mormot.net.server (8735):

  EHttpApiServer.RaiseOnError(hQueryUrlGroupProperty,  Http.QueryUrlGroupProperty(api.fUrlGroupID, HttpServerQosProperty, @info, SizeOf(info)));

After that, when I call 'AHttpServer.Free', the process never ends, and the application won't terminate. If I don't use 'TSynLog', this problem doesn't happen. Is there anything else, related to TSynLog, that needs to be done after that commit?

Last edited by Prometeus (2025-08-02 00:27:11)

Offline

#2 2025-08-01 20:21:49

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,148
Website

Re: Problem with TSynLog and TRestHttpServer after commit 2.3.11795

You are right.

Some http.sys methods were not working any more.
This API is really weird: the data should be all in a single struct - even if there is a pointer within the header, and it is not documented as such. sad
Microsoft is really inconsistent.
https://github.com/synopse/mORMot2/commit/992bfafe1

Offline

#3 2025-08-01 20:30:50

Prometeus
Member
From: USA
Registered: 2020-11-20
Posts: 56

Re: Problem with TSynLog and TRestHttpServer after commit 2.3.11795

Thank you, AB!

Everything is back on track, now!

Offline

Board footer

Powered by FluxBB