#1 2026-08-02 02:52:57

rcla
Member
Registered: 2025-12-13
Posts: 22

THttpWebsocketAsyncServer and ProcessIdleTix catched

I have a THttpWebsocketAsyncServer running on Windows 11 with PostgreSQL 18.0 and HTML/JavaScript clients.

WebSocket communication and queries are working correctly.

However, once there are no remaining connected clients (WebSocket connections), an "Access violation" error begins to appear every second after a few hours.

I enabled LOG_VERBOSE to see what was happening, and I found that when the last active client disconnects, the following appears:

20260801 08303936  1  +    mormot.rest.sqlite3.TRestServerDB(076a9b50) Shutdown() root CurrentRequestCount=0
20260801 08303936  1  -    00.002.402
20260801 08303937  1 info  mormot.rest.sqlite3.TRestServerDB(076a9b50) TRest.Destroy root
20260801 08303937  1  +    mormot.orm.sqlite3.TRestOrmServerDB(076ad370) Destroy root
20260801 08303937  1  +    	mormot.db.raw.sqlite3.TSqlDatabase(06fac2e0) Destroy 
20260801 08303937  1  +    		mormot.db.raw.sqlite3.TSqlDatabase(06fac2e0) DBClose
20260801 08303937  1 DB    			mormot.db.raw.sqlite3.TSqlDatabase(06fac2e0) closing [:memory:] 4 KB
20260801 08303937  1  -    		00.005.076
20260801 08303937  1  -    	00.010.371
20260801 08303937  1  -    00.015.342

Subsequently, it begins to show:

20260801 09390208  4 trace mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) DoGC #1=0 #2=1 free=0 client=0
20260801 09391142  4 trace mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) DoGC #1=0 #2=0 free=1 client=0
20260801 09405120  0 warn  mormot.net.ws.async.TWebSocketAsyncConnection(06e62f80) OnRead: close connection after ErrorRejected (before=GetCommand)
20260801 09405146  4 trace mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) DoGC #1=0 #2=2 free=0 client=0
20260801 09410117  4 trace mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) DoGC #1=0 #2=0 free=2 client=0
20260801 09463020  4 trace mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) DoGC #1=0 #2=1 free=0 client=0
20260801 09464024  4 trace mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) DoGC #1=0 #2=0 free=1 client=0
20260801 10100040  1 warn  mormot.net.ws.async.TWebSocketAsyncConnection(06e63b80) OnRead: close connection after ErrorRejected (before=GetCommand)

And finally:

20260801 19392240  4 EXCOS EExternalException (c0000005 EXCEPTION_ACCESS_VIOLATION) [8080] at 01001d1b5b  {16 0.11 0.17 2 4.6GB/15.4GB 66581b01}
20260801 19392243  4 warn  mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) ProcessIdleTix catched {EAccessViolation(073a9b70):{Message:"Access violation"}}
20260801 19392340  4 EXCOS EExternalException (c0000005 EXCEPTION_ACCESS_VIOLATION) [8080] at 01001d1b5b  {16 0.11 0.17 2 4.6GB/15.4GB 66581b01}
20260801 19392340  4 warn  mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) ProcessIdleTix catched {EAccessViolation(073a9ab0):{Message:"Access violation"}}
20260801 19392439  4 EXCOS EExternalException (c0000005 EXCEPTION_ACCESS_VIOLATION) [8080] at 01001d1b5b  {16 0.11 0.17 2 4.6GB/15.4GB 66581b01}
20260801 19392439  4 warn  mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) ProcessIdleTix catched {EAccessViolation(073a9b70):{Message:"Access violation"}}
20260801 19392460  4 trace mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) DoGC #1=1 #2=1 free=0 client=1
20260801 19392540  4 EXCOS EExternalException (c0000005 EXCEPTION_ACCESS_VIOLATION) [8080] at 01001d1b5b  {16 0.11 0.17 2 4.6GB/15.4GB 66581b01}
20260801 19392540  4 warn  mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) ProcessIdleTix catched {EAccessViolation(073a9ab0):{Message:"Access violation"}}
20260801 19392545  4 trace mormot.net.ws.async.TWebSocketAsyncConnections(060686f0) DoGC #1=0 #2=2 free=0 client=1

Thank you for any help you can provide.

Last edited by rcla (Yesterday 18:30:03)

Offline

#2 Yesterday 18:28:33

rcla
Member
Registered: 2025-12-13
Posts: 22

Re: THttpWebsocketAsyncServer and ProcessIdleTix catched

Sorry for the inconvenience. It was my mistake, as I had mixed up several test versions.

I have corrected my code and updated it to the latest version of mORMot2 '2.4.16181'.

It works like a charm.

Many thanks for developing mORMot2.

Offline

Board footer

Powered by FluxBB