From: Thomas H. <th...@ct...> - 2009-02-16 16:19:17
|
Ronnie schrieb: > Hello, > I am running an python IRC server using py2exe and am running into a problem > with maximum connections (approx 1970). > > The following is displayed: > > Exception in thread Thread-1957: > Traceback (most recent call last): > File "threading.pyc", line 486, in __bootstrap_inner > File "threading.pyc", line 663, in run > File "threading.pyc", line 440, in start > error: can't start new thread > > > I assumed this might be a RAM issue (1GB on my current machine), and ran the > same script on a much more powerful server (4GB) and had the same results, > so it cannot be that. > > When I run the python script itself (not via py2exe) it only allows approx > 1015-1020 connections, so using py2exe alone almost doubles the limit. Can > anyone offer some information as to why this is, and how I can further > increase the limit. > > After googling around it appears that in order to allow more connections per > process I need to raise my FD limit, is this true (and how can I do it using > py2exe). > > My platform is Windows XP. I *think* that each thread has a stack space (on WinXP) of around 1MB. So you may be reaching the virtual address space limit of 2GB. This limit does not depend on the physical memory available afaik. I have no idea why the Python script allows less threads. Thomas |