Applies To:
  • CitectSCADA 4.xx, 5.xx

Citect is displaying the error "Cannot Create win32 thread error" and then aborts. What is the cause of this error? 

Citect uses threads to increase performance is various sub systems. Threads are used for Networking between client/server when using TCP/IP communication, CTAPI and Cicode debugger communication, trend server flushing, cicode Modem Line functions, I/O Server cache flushing and for Serial communication in drivers..

The trend server threads are created once at start so this would only cause an problem if you received this error on startup. The Serial communication in drivers are also created at startup, but if they fail they don't generate this error message. If you are using the Line Modem dial functions that could be the cause. If the error occurs when you connect via CTAPI or the Cicode debugger that could be the cause. The I/O Server Persistance cache also created threads at the 


which defaults to 600 seconds. This is the most likely cause of the problem as it creates a new thread every 10 minutes. You can disable this by setting the parameter to 0.

The reason for this error is that Citect it trying to create a new Thread and that call is failing. There is a hard limit of 2048 threads on Windows XP, but I think the limit may be lower under previous versions of Windows. Also each thread takes up 1MB of virtual memory for it's stack space. So if you have say 256Meg RAM, with a total of 512Meg of Virtual RAM, you would have a limit of 512 threads.

Citect would normally use only around 10 threads, so this should not stretch the Windows limit. However the thread pool is global so if there is other application running on the computer which are using a lot of threads it could be an issue. You can use the Windows Performance Monitor to check if any other applications are using a lot of threads.

Solution is to increase RAM or Virtual RAM, Set 


or find out why other application are using lots of threads.