0

We have a mail server, which have courier running. Inside the same box, I setup the Roundcube webmail, which connect the courier by IMAP.

Below is the listing of lsof output.

apache2    4528 www-data   15u  IPv6 7132064      0t0  TCP localhost:55153->localhost:imap2 (CLOSE_WAIT)
apache2    6441 www-data   15u  IPv6 7123710      0t0  TCP localhost:40516->localhost:imap2 (CLOSE_WAIT)
apache2    6711 www-data   15u  IPv6 7125315      0t0  TCP localhost:54507->localhost:imap2 (CLOSE_WAIT)
apache2    8003 www-data   15u  IPv6 7118138      0t0  TCP localhost:38712->localhost:imap2 (CLOSE_WAIT)
apache2   18613 www-data   15u  IPv6 5109270      0t0  TCP localhost:51262->localhost:imap2 (CLOSE_WAIT)

Sometime the apache2 -> courier connection has CLOSE_WAIT, it will slow down the CPU and wait forever, we have to kill them each time. I have search the internet and Server Fault here, some say it is due to the client problem has bug, it has not send the close signal back to the server. Anway, I have notice it is openning in IPv6. Is it the reason of the problem? if yes, how can I force the apache2 -> courier imap connection in IPv4?

  • IPv6 is preferred over IPv4. Anyway, this is almost certainly _not_ the cause of the problem. – Michael Hampton Mar 14 '13 at 12:09
  • yes, I also agree with you, if both processes can start to talk in IPv6 way, why they don't make it when finish? I believe IPv6 is reliable in Linux OS. But this bug make me crazy, I just want to try out every possible solution I can do about. Assume the apache2 may has bug when sent out CLOSE signal by IPv6....only god know. –  Mar 15 '13 at 07:52

1 Answers1

0

I don't think IPv6 can slow your connection. You can put the IPv4 of your imap server instead of the name in the roundcube configuration to check that.

Do you check your logs ? Roundcube logs ? courier logs ?

Dom
  • 6,628
  • 1
  • 19
  • 24
  • ic, i can try input the imap host address to '127.0.0.1' instead of 'localhost'? in the roundcube config file. let me try . thanks. –  Mar 14 '13 at 08:45
  • Yes ! I hope it will locked in IPv4 – Dom Mar 14 '13 at 09:02
  • I disable my server reboot script and let it run for 1 week, to see if any new CLOSE_WAIT. hope that help. if doesn't help. my final solution will be build a corn job with scripts to monitor the CLOSE_WAIT and kill them. –  Mar 14 '13 at 09:03