hMailServer Administrator causing mail server to become unresponsive
hMailServer Administrator causing mail server to become unresponsive
I don't know if anyone else has noticed this, but when I spend a lot of time in hMailServer Administrator, it's responsiveness starts to becomes sluggish and so does the mail server itself (connected mail clients clearly start taking longer to load messages, change folders, save draft messages, etc). I can really notice this when I switch to and from the IP ranges screen because there are a many of banned IP ranges in my list (close to 1000, coming from a script), which seems to make the problem appear much faster. This screen in particular experiences weird glitches the more times I switch in and out of it (i.e. deleting IP ranges stops working, things progressively get slower).
Closing and reopening Administrator doesn't help, it takes a full server restart. I've taken to always restarting hMailServer after using Administrator and never leaving Administrator running when I'm not using it (seems to have caused my server to become completely unresponsive last time I did this), which works, but there's definitely some kinda memory/connection/resource leak or something going on here that's bogging down the mail server even after closing Administrator.
Closing and reopening Administrator doesn't help, it takes a full server restart. I've taken to always restarting hMailServer after using Administrator and never leaving Administrator running when I'm not using it (seems to have caused my server to become completely unresponsive last time I did this), which works, but there's definitely some kinda memory/connection/resource leak or something going on here that's bogging down the mail server even after closing Administrator.
Re: hMailServer Administrator causing mail server to become unresponsive
Did you notice a increased Memory consumption?
I never experienced such symtoms but DCOM has a lot of Background code and doesnt run on Top of Boost ASIO Async call Handler as other connections like IMAP.
I never experienced such symtoms but DCOM has a lot of Background code and doesnt run on Top of Boost ASIO Async call Handler as other connections like IMAP.
Re: hMailServer Administrator causing mail server to become unresponsive
I see this with scripting... If I do too much code in the body of EventHandlers.vbs then the server is acting weird.mikernet wrote: ↑2019-02-28 20:57I don't know if anyone else has noticed this, but when I spend a lot of time in hMailServer Administrator, it's responsiveness starts to becomes sluggish and so does the mail server itself (connected mail clients clearly start taking longer to load messages, change folders, save draft messages, etc). I can really notice this when I switch to and from the IP ranges screen because there are a many of banned IP ranges in my list (close to 1000, coming from a script), which seems to make the problem appear much faster. This screen in particular experiences weird glitches the more times I switch in and out of it (i.e. deleting IP ranges stops working, things progressively get slower).
Closing and reopening Administrator doesn't help, it takes a full server restart. I've taken to always restarting hMailServer after using Administrator and never leaving Administrator running when I'm not using it (seems to have caused my server to become completely unresponsive last time I did this), which works, but there's definitely some kinda memory/connection/resource leak or something going on here that's bogging down the mail server even after closing Administrator.
eg. I have this "Include" function where I can include an external script, in this case a Class construct with my custom logwriter.
I added "Dim EventLogX : Set EventLogX = New LogWriter" to the body of EventHandlers. My custom logwriter is then called by EventLogX.Write( ... ).
It worked when I modified the code, pressed reload and then syntax, all passed no problems. Server slowed down a bit but nothing major.
An hour later I had to NET STOP the server and then NET START ... It hangs and eventually throws a COM error. Memory use in taskmanager is fixed on 8MB, usually it climbs to about 60MB.
I renamed all instances of EventLogX.Write to EventLog.Write (yes, it was deliberate ), put a remark on the line "Dim EventLogX : Set EventLogX = New LogWriter" and then everything was fine again.
I Could repeat my findings several times.
Then I tried adding "Dim EventLogX : Set EventLogX = New LogWriter" to "Sub OnClientConnect()" and added a few EventLogX.Write's ... No problems what so ever. Server started and stopped fine, no errors.
So, now I have no executing code in the body of EventHandlers, besides my Include function...
Code: Select all
Include("C:\hMailServer\Events\LogWriter.vbs")
Function Include(sInstFile)
Dim f, s, oFSO
Set oFSO = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
If oFSO.FileExists(sInstFile) Then
Set f = oFSO.OpenTextFile(sInstFile)
s = f.ReadAll
f.Close
ExecuteGlobal s
End If
On Error Goto 0
Set f = Nothing
Set oFSO = Nothing
End Function
SørenR.
Woke is Marxism advancing through Maoist cultural revolution.
Woke is Marxism advancing through Maoist cultural revolution.
Re: hMailServer Administrator causing mail server to become unresponsive
@Soren
Thats completely understanable.
With VBScript its even worst because it uses
the IDispose Method with dynamic Marshalling which is the worst case performance wise.But even the static generated COM proxy stubs, linked statically in .NET and Win32 Executables are ommun to this. The only way to avoid such effects is by avoiding COM, espacially in 32-Bit hMailServer builds.
Thats completely understanable.
With VBScript its even worst because it uses
the IDispose Method with dynamic Marshalling which is the worst case performance wise.But even the static generated COM proxy stubs, linked statically in .NET and Win32 Executables are ommun to this. The only way to avoid such effects is by avoiding COM, espacially in 32-Bit hMailServer builds.
Re: hMailServer Administrator causing mail server to become unresponsive
I ALWAYS have the admin gui open.
How would define sluggish?
I rarely have the IP ranges screen open though because I too have hundreds of them, but that is about how slow that list is to load
How would define sluggish?
I rarely have the IP ranges screen open though because I too have hundreds of them, but that is about how slow that list is to load
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
Re: hMailServer Administrator causing mail server to become unresponsive
I haven't really paid attention to the memory usage as the server has plenty of free memory so I'm not sure if it's actually using more memory. I doubt the issue would be just memory leak related, something else is going on that's causing this.
In terms of what I mean about sluggish - switching between different interface screens becomes slower and slower and eventually things just stop working (i.e. I delete an entry but it doesn't actually remove from the list, or settings that should save don't stick...things just start acting really weird).
In terms of what I mean about sluggish - switching between different interface screens becomes slower and slower and eventually things just stop working (i.e. I delete an entry but it doesn't actually remove from the list, or settings that should save don't stick...things just start acting really weird).
Re: hMailServer Administrator causing mail server to become unresponsive
I don't get that at all.
I do get large screens (IP ranges) loading slowly, but that's all of the time. It doesn't get worse for me, or slow down that I can tell
I do get large screens (IP ranges) loading slowly, but that's all of the time. It doesn't get worse for me, or slow down that I can tell
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
Re: hMailServer Administrator causing mail server to become unresponsive
Yeah, I don't know...I literally just had to restart hMailServer again because it completely stopped responding to SMTP requests after the HELO because I had the Administrator application open for too long, haha. No errors in any logs, nothing. I can run hMailServer with a year of uptime no problem if I'm not doing heavy work that involves Administrator being open for hours at a time, but whenever I get into some custom dev work that requires a significant amount of time this always happens.
I wasn't even really using it all that much this time, it was just open for a while so I could check things here and there.
Anyway, I guess it is what it is...at least it's an easily manageable and predictable problem.
I wasn't even really using it all that much this time, it was just open for a while so I could check things here and there.
Anyway, I guess it is what it is...at least it's an easily manageable and predictable problem.
Re: hMailServer Administrator causing mail server to become unresponsive
What version of hMailserver are you using...?
I've seen similar issues with some older builds
I've seen similar issues with some older builds
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
Re: hMailServer Administrator causing mail server to become unresponsive
Latest 5.6.7-B2425. I haven't done a fresh install since the first time I installed it probably more than 10 years ago now though...just been upgrading it and the original 2008 R2 VM it was installed on is still chugging along today haha. Not sure if there's anything about that that may be causing this issue.
Re: hMailServer Administrator causing mail server to become unresponsive
I am not very technical in this area but I too have noticed my hMailAdmin function has for some time now been running a bit slower than when I first started using hMailServer years ago. I've noticed hMailAdmin has been slower to launch and listing my Email Accounts for one Domain is particularly slower than before.
I've accounted for this slowing down mostly due to the fact the one Domain I am always making entries in is my Domain I reserve for my Business Emails of which there are probably somewhere between 200 - 300 email ids so far. I attributed the slower response (not much but noticeable) to the increasing number of email accounts I have been adding to this one Domain. one of my other Domains of which there are only 2 or 3 Email Accounts in it have fairly quicker response times than the Business Accounts Domain.
I also just now looked at my Database Server (MySQL 8.0) and it has 344.5 MB of memory being used and a few minutes before I noticed it jumped by 1 MB and I don't know why that happened. I checked the memory usage of all the applications and processes running on my PC and noticed too that MySQL 8.0 has the highest memory usage of all. I have only one database I created in the MySQL 8.0 and that is hMailServer. So it has virtually nothing in it. When I installed MySQL I set it up as a Development Database Server as I didn't need many connections and I didn't need to have a lot of memory as I do not run a commercial system and it is only for my personal use and I have no more email than an ordinary home user. But as I keep adding more business Email Accounts I noticed slower response in hMailAdmin.
This next issue is probably low probability but I have run into 2 people who had slow response in general on their PCs and who don't run email servers either. For some reason there Virtual Memory size automatic Windows Managed page file size had been turned off and they had a very small page file size. I increased there Page File size (one by manual method and the other by having them check the Automatically Windows Manage option and in both cases the PC response time went to normal. They had been experiencing a general slow down particularly when changing from one window to another.
Can't say this is the problem but it might be worth checking so you can rule it out.
I've accounted for this slowing down mostly due to the fact the one Domain I am always making entries in is my Domain I reserve for my Business Emails of which there are probably somewhere between 200 - 300 email ids so far. I attributed the slower response (not much but noticeable) to the increasing number of email accounts I have been adding to this one Domain. one of my other Domains of which there are only 2 or 3 Email Accounts in it have fairly quicker response times than the Business Accounts Domain.
I also just now looked at my Database Server (MySQL 8.0) and it has 344.5 MB of memory being used and a few minutes before I noticed it jumped by 1 MB and I don't know why that happened. I checked the memory usage of all the applications and processes running on my PC and noticed too that MySQL 8.0 has the highest memory usage of all. I have only one database I created in the MySQL 8.0 and that is hMailServer. So it has virtually nothing in it. When I installed MySQL I set it up as a Development Database Server as I didn't need many connections and I didn't need to have a lot of memory as I do not run a commercial system and it is only for my personal use and I have no more email than an ordinary home user. But as I keep adding more business Email Accounts I noticed slower response in hMailAdmin.
This next issue is probably low probability but I have run into 2 people who had slow response in general on their PCs and who don't run email servers either. For some reason there Virtual Memory size automatic Windows Managed page file size had been turned off and they had a very small page file size. I increased there Page File size (one by manual method and the other by having them check the Automatically Windows Manage option and in both cases the PC response time went to normal. They had been experiencing a general slow down particularly when changing from one window to another.
Can't say this is the problem but it might be worth checking so you can rule it out.
If you think you understand quantum mechanics, you don't understand quantum mechanics.