#1 2015-08-04 06:54:40

mariomoretti
Member
From: italy
Registered: 2012-01-29
Posts: 88

server and client in interfaced based service

Hi AB,

first of all : finally my interfaced based service works !  tx very much !!!

The server application has a main form wich ownes a tSQLRestServerDB an also a tSQLRestClientURI, created only on need : this to permit some administration customization.

All works fine but, shutting down the process , if I've created and used the interface methods from client, some threads remain active after all objects have been destroyed : consuming over a 30% of cpu resources.

When starting the program , without using the inside client, shutdown works well.

I'm in this situation because initially, the application used vcl objects and direct calls to the server : then , adding services and  permit use of your great tSQLGTableToGrid,   I've introduced the client.

I have to create two distinct program ? The server and a client for administration tasks ?

tx

Offline

#2 2015-08-04 09:25:46

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: server and client in interfaced based service

Which threads?

How are they named in the IDE?
If you debug within the IDE, the threads would be named in the IDE "thread list" window.
I think it may help identify which threads are still working.

Offline

#3 2015-08-04 10:49:47

mariomoretti
Member
From: italy
Registered: 2012-01-29
Posts: 88

Re: server and client in interfaced based service

In thread status  panel stay these threads in state runnable (while destroying form they are in statu stopped)

Main thread :
tSQLHttpServer worker : 32 threads.

sometimes there are other 3 unnnamed  threads (only id).

objects destroy order is :

Client
HttpServer
Server

Offline

#4 2015-08-04 10:53:10

mariomoretti
Member
From: italy
Registered: 2012-01-29
Posts: 88

Re: server and client in interfaced based service

After a while, the unnamed threads end.

Offline

#5 2015-08-04 11:30:20

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: server and client in interfaced based service

If the thread is not named, it is not a thread directly created by mORMot, I'm afraid...

It may be a thread created by Windows, for a particular purpose.

Offline

#6 2015-08-04 14:53:10

mariomoretti
Member
From: italy
Registered: 2012-01-29
Posts: 88

Re: server and client in interfaced based service

yes but, the unnamend threads end after one minute, non so do the httpserver worker that stay alive forever : i haven't killed the last process and they are still running.

Offline

#7 2015-08-04 22:29:09

mariomoretti
Member
From: italy
Registered: 2012-01-29
Posts: 88

Re: server and client in interfaced based service

No, httpserver threads end normally : remain only other unnamed threads.
Im investigating....

Offline

Board footer

Powered by FluxBB