Tomas Kuliavas wrote:
Thanks for that, it gives localhost: 0.0099411010742188 and mail.babbnet.com: 5.2097821235657[EMAIL PROTECTED] wrote:Message: 2 Date: Mon, 8 May 2006 16:30:44 +0300 (EEST) Subject: Re: [SM-USERS] Possible DNS problem being shown by Squirrelmail From: "Tomas Kuliavas" <[EMAIL PROTECTED]> To: squirrelmail-users@lists.sourceforge.netI've recently installed Squirrelmail on two virtualised (running Plesk & Virtuozzo) supposedly identical web servers running FC3. My problem is that on one server there was a delay of 5-10 seconds in displaying any pane in Squirrelmail. This same server was initially unable to resolve any external addresses and was fixed by Tech Support adding another name server to /etc/resolv.conf . Then it was slow to resolve external addresses (the same 5-10 seconds) upon doing something like "wget http://www.google.com", I fixed this myself by changing the DNS servers in /etc/resolve.cfg to be the same ones as on the trouble-free server. However Squirrelmail was still exhibiting the 5-10 second delay when opening panes. By changing the IMAP server that SM uses from "mail.babbnet.com" to "localhost" I was able to remove this delay. However I'm conscious the underlying problem is still there and I would like to work out what is going on. I would like to be able to do something on the command line to illustrate the problem to Tech Support (I can't just tell them SM is slow as SM is installed by myself and as such isn't supported by them) and would ideally like to be able to fix it myself without waiting for them! Can anyone see why "mail.babbnet.com" vs. "localhost" would cause this delay?a) localhost is resolved in /etc/hosts, mail.babbnet.com is resolved in dns. b) connection to mail.babbnet.com goes through different interface and some traffic (maybe tcp/113) is dropped by firewall rules. if you are unprivileged user on server and can change globally used dns server's without any help from tech support - change your provider. /etc/resolv.conf is not supposed to be world writable.Hi, I have root access to these servers so there's no problem there! I'm just trying to work out what I can do to illustrate this problem to tech support, it's no use telling them how the problem manifests itself in Squirrel Mail as they don't support this seeing as I've installed it myself. How could I replicate the slow resolution of mail.babbnet.com on the command line?---- <?php function microtime_float() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } $start = microtime_float(); $stream = fsockopen('localhost', 143,$errorNumber, $errorString); if(!$stream) { die('connection failed'); } $imapline = fgets($stream, 1024); fputs($stream, "A001 LOGOUT\r\n"); fclose($stream); $end = microtime_float(); echo $end - $start; ?> ---- replace 'localhost' with 'mail.babbnet.com' or ip address and time code execution ('time php test.php'). 143 is port number. If you use TLS, prefix host name with 'tls://' and change port number. Hopefully this simplified illustration of the problem should be good enough for Tech Support to fix the problem. Thanks, Geoff |
- Re: [SM-USERS] Possible DNS problem being shown by Squirrel... Geoff Soper
- Re: [SM-USERS] Possible DNS problem being shown by Squ... Tomas Kuliavas