Title: Error "Cannot create a hidden window for TWSocket" during service startup Post by: treebyte_srl on May 16, 2016, 10:58:19 AM Hello,
from this morning I have a very strange error on a customer server. When our service, that uses RTC, try to startup, I obtain an error Cannot create a hidden window for TWSocket" during service startup. Looking on the sources, I found the message on method TRtcWinSocket.GetWindowHandle of the unit rtcWinSocket, and is generated when the function rtcGetHWND of the unit rtcHWndPool can't return a window handle. I've never seen this message before, and searching on web I don't figure out what could be a possible reason. Except restart the server, what can I do to solve the problem ? Thanks in advice, best regards Giuseppe Garzotto treebyte S.r.l. Title: Re: Error "Cannot create a hidden window for TWSocket" during service startup Post by: D.Tkalcec (RTC) on May 16, 2016, 12:04:44 PM If the Server was running without any problems before, then my guess is that another Application or Service has been installed recently, which is using too many Window handles, leaving your Application out of resources. Until you find out what is causing this problem, you can set the "Blocking" property of your TRtcHttpServer component to TRUE to switch to the blocking WinSock API instead of the async WinSock API, thus eliminating the need for a Window handle, but ... please keep in mind that a blocking WinSock API requires more CPU resources, because all "inactive" sockets will have to be checked for incoming data periodically.
Best Regards, Danijel Tkalcec Title: Re: Error "Cannot create a hidden window for TWSocket" during service startup Post by: treebyte_srl on May 16, 2016, 01:23:39 PM Thanks Danijel.
I contact the customer, and after a restart of server the service is working properly again. So, the problem seems actually a lack of resources, even if the customer swears he did not install anything in the last few days :). However, we'll monitoring the situation every day and I'll follow your suggestion, if needed. Best regards Giuseppe Garzotto treebyte S.r.l. |