No more threads can be created in the system error

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
Goldwing
New user
New user
Posts: 3
Joined: 2015-06-22 16:09

No more threads can be created in the system error

Post by Goldwing » 2015-06-22 16:12

I´m having major problems with hmailserver
every minit or so i´m getting the following error
No more threads can be created in the system. (Exception from HRESULT: 0x800700A4)

ExceptionType: COMException
HelpLine:
Message: No more threads can be created in the system. (Exception from HRESULT: 0x800700A4)
Source: Interop.hMailServer
StackTrace: at hMailServer.StatusClass.get_ProcessedMessages()
at hMailServer.Administrator.ucStatus.ShowStatistics()
at hMailServer.Administrator.ucStatus.timerServerStats_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
TargetSite: Int32 get_ProcessedMessages()
And when i´m getting that error messages recieved at that time are deleted from the mail client (you see the message with a line thru it, but are unable to open is)

Any suggestions?

User avatar
jimimaseye
Moderator
Moderator
Posts: 7235
Joined: 2011-09-08 17:48

Re: No more threads can be created in the system error

Post by jimimaseye » 2015-06-22 17:37

Further info may help.

Memory used and available?
O/S? and Hardware config?
HMS version?
Other software running?
SETTINGS - ADVANCED - PERFORMANCE - THREADING : figures are?
HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

Goldwing
New user
New user
Posts: 3
Joined: 2015-06-22 16:09

Re: No more threads can be created in the system error

Post by Goldwing » 2015-06-23 09:56

Memory: 8GB 14% used
CPU: Core i3-2100
OS: Win 2008r2
Version : 5.6.3-B2249
Other software : none, it's just a fileserver and mailserver
Max command threads : 15
Delivery threads : 10
Max async threads : 15
Worker thread : Normal

User avatar
mattg
Moderator
Moderator
Posts: 18673
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: No more threads can be created in the system error

Post by mattg » 2015-06-23 11:07

My thread settings on a small hmailserver are 25,10,50

* small = 6 domains, 40 or so accounts, 250 messages per day

What is your # of domains / accounts / mail per day??
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
jimimaseye
Moderator
Moderator
Posts: 7235
Joined: 2011-09-08 17:48

Re: No more threads can be created in the system error

Post by jimimaseye » 2015-06-23 11:10

You rebooted your server? Did it make a difference?

This thread suggests you could Restart the "Windows Management Instrumentation" service. http://blogs.technet.com/b/configmgr/ar ... scvmm.aspx
HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

Goldwing
New user
New user
Posts: 3
Joined: 2015-06-22 16:09

Re: No more threads can be created in the system error

Post by Goldwing » 2015-06-23 12:40

@mattg
This is a very small server, 1 domain, about 50 to 100 mails a day 2 users using the same mailbox and one iPhone

User avatar
jimimaseye
Moderator
Moderator
Posts: 7235
Joined: 2011-09-08 17:48

Re: No more threads can be created in the system error

Post by jimimaseye » 2015-06-23 12:53

Your setup is not that far different from mine, Goldwing. The only noticable and relevant difference is the HMS version. I have never had these problems (most things about my server and software is 'default' (including at windows (2008 R2 Foundation) level and HMS settings). Maybe worth just doing the reboot and see how you get on.
HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
martin
Developer
Developer
Posts: 6777
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: No more threads can be created in the system error

Post by martin » 2015-06-25 09:20

Try the following:
1) Open up the Windows task manager
2) Go to the Details tab
3) Select to view the column Threads
4) Sort by threads

(The exact UI differs between different versions of Windows, but all versions should have the capability to view thread count)

Is there any process using more than 1000 threads? hMailServer should normally be using <1000 threads.

The error is originally reported by Windows. According to Windows docs, this means that you should "free some threads or processes", which isn't really helpful.
Martin Knafve
martin@hmailserver.com
https://twitter.com/knafve

Post Reply