Serious Mail Server Migration Problems

roarkh

Verified User
Joined
Aug 30, 2005
Messages
141
Location
Bellingham, WA
Over the weekend I finished migrating two large sites from an old DirectAdmin server to a new one, the migration seemed to go very smoothly and everything seemed to be working but as soon as the server got hit with a bit of a load this morning I am having all kinds of problems.

Sending seems to work fine for some people, other people will either time out or it takes forever for the server to respond, I don't see anything in the exim logs to explain it.

Receiving mail is even a bigger problem, I did see a message in the maillog about the need to increase /proc/sys/fs/inotify/max_user_instances which I did from 128, to 1024, I restarted dovecot and for a bit it seemed to work fine, but now it is timing out for people again, there seems to be a limit to the number of allowed active connections but I don't see that indicated in dovecot.conf. Does anyone have any idea how many imap connections are allowed by default with Dovecot?

I'm a bit desperate here.

Thanks in advance.

Roark Holz
 
I am pretty sure this has to do with a Dovecot setting, with Dovecot 1 I was able to fix this problem if I remember correctly by increasing login_max_processes_count = 128 and/or login_max_connections = 256 but the Dovecot 2 configuration seems to have totally changed and I am having a really hard time finding how to manage these settings with this new version. Does anyone have any ideas? The Dovecot 2 Wiki so far is not helping me. If someone thinks they know how to fix this I would be willing to pay for some tech support as well. Thanks in advance.
 
Hello,

Some ideas about dovecot and default config coming with custombuild are posted here by me. There you can find how to see the whole dovecot settings list. So you might want to enable debug mode.

You might want to enable full logging in exim, see here some details.
 
@zEitEr:

Is that config you posted for the latest Dovecot?

Within the next few weeks I'm migrating a few old servers to one big new one, so I may need larger numbers, and I want to be sure.

Thanks.

Jeff
 
@Jeff,

That's actual for Dovecot 2.x (including the latest 2.0.15). Note, there have been around two-three new releases since the post. And for now the issue mentioned in the topic with config extract no more troubles us. So feel free to update figures to fit your needs, I've never met any new issues with those numbers.
 
Hello,

Some ideas about dovecot and default config coming with custombuild are posted here by me. There you can find how to see the whole dovecot settings list. So you might want to enable debug mode.

You might want to enable full logging in exim, see here some details.

Thanks for posting this, I'm looking over these settings and am still a bit confused. It seems that you are lowering the process and client limits from unlimited? My problems seems to be that I don't have enough available. I have about 200 users that connect to this server simultaneously using imap. If I restart dovecot it kicks everyone out and if I'm sitting at someone's machine I can always get them logged back in and everything works fine for a bit, as more and more people's email starts to connect eventually I get to a place where a connection limit seems to be reached and no more connections are allowed. What were the symptoms you had that caused you to make these changes?

Thanks for looking at this.

Roark Holz
 
I think this is solved

After some more digging through the logs I found something that was coming up I had missed before, basically, after restarting Dovecot it would run for about 8 or 9 minutes and then this event was being logged...

Code:
dovecot: master: Warning: service(imap-login): 
process_limit reached, client connections are being dropped

This really helped point me in the right direction.

I combined the settings zEitEr provided for his server in his previous post increasing the limits some and the server has gone for about 3 hours now without exhibiting the problem. These are the sections with changes I made to my dovecot.conf file in case it helps someone else...

Code:
service imap-login {
  client_limit = 1024
  process_limit = 1024
  process_min_avail = 16
  service_count = 1
  user = dovecot
  vsz_limit = 64 M
}
service pop3-login {
  client_limit = 1024
  process_limit = 1024
  process_min_avail = 16
  service_count = 1
  user = dovecot
  vsz_limit = 64 M
}

It may be that I increased these limits beyond what is really necessary, I may go back and revisit them once I get caught up on some other things. Thanks everyone for your ideas and especially to zEitEr for posting the link to your config.
 
Back
Top