PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → HFSql Center Connection Information
HFSql Center Connection Information
Débuté par Noel Tanti, 11 aoû. 2017 10:08 - 4 réponses
Posté le 11 août 2017 - 10:08
Hi All

in the screen there is no information of when the connection was last used or when it was created.

I am having servers with hundreds of connections, some connections are obviously dead, and cannot know which are the ones in use so that I can remove the others.

1. does this date/time detail exist somewhere in the hfsql center
2. what can I do on the software side to clear ,dead. connections or make sure that when the user exit the applications the connection is closed?

Thanks & regards
Noel
Posté le 11 août 2017 - 13:42
Maybe Hcloseconnection?
Posté le 11 août 2017 - 14:43
Hi Jan,

Noel is talking about the HF Control Center 'Connections' tab on an HFSQL C/S...
This is a shortcoming/bug that has always been around.

In short: In the grid listing the actual connections, you have no clue if it is an active connection or a dead one.
There's no date, time, last activity timestamp or whatever to identify that.

We still have a WD application running for one of our clients that connects to a cloud HFSQL C/S.
Most of the times when the client app has to reconnect to the HFSQL C/S (happens a lot when the customer is using a WiFi connection) the old connection will be dead but it will still be listed in the Control Center as an active connection and a new one will be created and added into this list. As of that moment you have no clue which one has become obsolete and thus which one you can kill. Simply because the data to analyse it is not there...

I always have known this as an issue but it didn't seem to affect performance so it wasn't a major deal... Might be I even raised a support call for it 7 years ago or so (Not sure though)... Guess the other 9xx something gadgets had as usual more priority instead of fixing stuff.

Cheers,

Peter Holemans
Posté le 11 août 2017 - 15:12
Hi Noel

there was an example doing just that in the last LST. I cannot give it to you for legal/copyright reason, but I can explain the principal of the thing:

- from your program or a utility connected to the same DB, you send a broacast message to all clients using HSendMessageToClient
- of course, it means that your prgram must be able to receive such message (and do nothing)

The neat trick is that when the HF server sends the broadcast message to each open connexion, it also CLOSES each connexion that does not 'answer', ie is dead.

And hop, it's done.

Best regards
Posté le 11 août 2017 - 15:35
As you say 'neat trick' if somewhat bizarre.

PCS at their very eccentric best:rolleyes: