[twsocket] Unable to create TIcsWndControl hidden window.

2013-04-12 Thread Max Terentiev
Hi,

My app uses TWSocket (TSmtpCli) inside TThreads.

I create 25 TSmtpCli's per TThread. All TSmtpCli instances 
created inside TThread Execute. TStmpCli-MultiThreaded
set to true. My TThreads have message loops.

With 5000 SmtpCli's (inside 200 TThreads) I got exception:

Unable to create TIcsWndControl hidden window. Error 1158

How I can use 4-5K of TSmtpClis in my app ?

P.s: ICS v7, C++Builder 2007 with all updates, my app uses
FastMM and FastCode.

Thanx for help !

---
With best regards, Max Terentiev.
Business Software Products.
AMS Development Team.
supp...@bspdev.com


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Unable to create TIcsWndControl hidden window.

2013-04-12 Thread Angus Robertson - Magenta Systems Ltd
 Unable to create TIcsWndControl hidden window. Error 1158
 How I can use 4-5K of TSmtpClis in my app ?

You are probably out of memory. You need a 64-bit server OS for a lot of
connections.  

You can use these APIs to get various memory information about your
application and the PC, to see what is causing your limit: 

GetProcessMemoryInfo, GlobalMemoryStatusEx and GetPerformanceInfo

My web server application logs this lot hourly:

23:00:10 Program Resources: Handles 225, Memory: Working Set 54.0M, Paged
Pool 131K, Non Paged Pool 19.0K, Peak NP Pool 928K
23:00:10 Global Memory Usage: Load 89%; Total Phys 4.00G; Free 432M;
Total Paging 8.17G; Free 4.73G; Total Virt 2.00G; Free 1.91G
23:00:10 Commit Total 3.45G, Commit Limit 179M, Commit Peak 3.81G,
Physical Total 4.00G, Physical Available 432M, System Cache 854M
23:00:10 Kernel Total 342M, Kernel Paged 223M, Kernel Nonpaged 119M,
Total Handle Count 24,671, Total Process Count 70, Total Thread Count 959

Angus








--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be