Hmailserver 5.3 - recommended mysql settings?

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
entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Hmailserver 5.3 - recommended mysql settings?

Post by entropicsinkhole » 2009-12-09 18:31

System specs: Server 2003 SP2, Intel Xeon 3.6GHz (2 Processors), 6GB memory.

Using mysql 5.3.17 (not built-into hmailserver), which is hosted on the same server as hmailserver. I keep getting errors 'timeout reading communication packets'. What settings should I adjust in the my.ini file to stop/minimize these? Suggestions?

My global variables (the ones that have to do with buffer or timeout):

connect timeout 10
innodb additional mem pool size 2,097,152
innodb buffer pool size 16,777,216
innodb lock wait timeout 50
innodb open files 300
innodb thread concurrency 8
interactive timeout 28,800
join buffer size 131,072
key buffer size 16,777,216
key cache block size 1,024
max allowed packet 1,048,576
max binlog cache size 4,294,963,200
max binlog size 1,073,741,824
max connect errors 10
max connections 151
max delayed threads 20
max user connections 0
net buffer length 8,192
net read timeout 30
net retry count 10
net write timeout 60
preload buffer size 32,768
query alloc block size 8,192
query cache limit 1,048,576
query cache size 0
query prealloc size 8,192
range alloc block size 4,096
read buffer size 262,144
read rnd buffer size 524,288
shared memory OFF
slave net timeout 3,600
sort buffer size 524,288
sql max join size 18446744073709551615
sql mode
table definition cache 256
table lock wait timeout 50
table open cache 64
table type MyISAM
thread cache size 0
thread handling one-thread-per-connection
thread stack 196,608
wait timeout 28,800

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

Re: Hmailserver 5.3 - recommended mysql settings?

Post by martin » 2009-12-09 18:41

timeout reading communication packets
Can you post the full error message?

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: Hmailserver 5.3 - recommended mysql settings?

Post by entropicsinkhole » 2009-12-10 15:28

These are the errors I get in the mysql.err file. I get the exact same ones in Windows eventviewer. The connection number changes, but the rest of the error message remains consistent.

091204 6:55:36 [Warning] Aborted connection 15 to db: 'hmailserver' user: 'root' host: 'localhost' (Got timeout reading communication packets)

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

Re: Hmailserver 5.3 - recommended mysql settings?

Post by martin » 2009-12-10 20:05

Is there anything reported in the hMailServer event log when the problem occur?

Could it be that the connection is simply lost because hMailServer hasn't used it in a while (8 hours in your case)? hMailServer opens up several connections to MySQL (5 by default) and unless the server is under high load, they may not be used. If hMailServer wants to re-use a connection which has been closed, hMailServer should reconnect. So if this is the problem, it shouldn't really be a problem.

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: Hmailserver 5.3 - recommended mysql settings?

Post by entropicsinkhole » 2009-12-10 20:44

Is there anything reported in the hMailServer event log when the problem occur?
Nope. I had another error at 7:01:15 this morning. In the error log there is gap where nothing happens between 07:01:14.210 and 07:01:28.070

"DEBUG" 4704 "2009-12-10 07:01:14.210" "Closing TCP/IP socket"
"DEBUG" 4704 "2009-12-10 07:01:14.210" "Ending session 127499"
"TCPIP" 10156 "2009-12-10 07:01:28.070" "TCPConnection - Posting AcceptEx on 0:0"
"DEBUG" 10156 "2009-12-10 07:01:28.070" "Creating session 127500"
Could it be that the connection is simply lost because hMailServer hasn't used it in a while (8 hours in your case)?
Even at night, we still get many emails coming through hourly, though not as heavily. By light I mean 20-100 emails an hour even at our lowest use (3-4am in the morning). It would be very rare that nothing would come across in an hour, even on a weekend or at night. The spam alone would probably would keep it active :-/

However, if you're talking about 5 connections being open... if these messages aren't coming in all at once, will it just keep using the same one or two connections (or whatever) and just drop any that aren't being used? Or does it rotate through the 5 connections, so that they all get 'equal time'?

Post Reply