LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-18-2009, 01:08 PM   #1
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 322

Rep: Reputation: 30
Mail server timing out


I've been running Courier and in the past weeks it started getting time out errors intermittently. I wrote a Python script to test it (runs every minute):
Code:
import poplib, time, urllib, socket, getpass
socket.setdefaulttimeout(30)
from datetime import date

if True:
 try:
  #print "1/2\n"
  o = open('output.txt', 'a')
  opener = urllib.FancyURLopener({})
  f = opener.open("http://www.myserver.com/up.php")
  strn = f.read()
  ok = time.strftime("%a %b %d %H:%M:%S %Y") + "- 1/2 Site Status:"+strn+"\n"
  o.write(ok)
  o.close()
 except Exception, er:
  pr = time.strftime("%a %b %d %H:%M:%S %Y")+"- 1/2 URL error: "+er+"\n"
  o.write(pr)
  o.close()

 try:
  #print "2/2\n"
  o = open('output.txt', 'a')
  M = poplib.POP3('myserver.com', 110, 30)
  M.user('me@myserver.com')
  M.pass_('pass')
  numMessages = len(M.list()[1])
  k = time.strftime("%a %b %d %H:%M:%S %Y")+"- 2/2 POP Okay. Messages: "+str(numMessages)+"\n"
  o.write(k)
  o.close()
 except Exception, e:
  prnt = time.strftime("%a %b %d %H:%M:%S %Y")+"- 2/2 (Site Status:"+strn+") POP Error:"+str(e)+"\n"
  o.write(prnt)
  o.close()
I see things like this:
Code:
Mon May 18 13:48:01 2009- 2/2 POP Okay. Messages: 0
Mon May 18 13:49:01 2009- 1/2 Site Status:okay
Mon May 18 13:49:02 2009- 2/2 POP Okay. Messages: 0
Mon May 18 13:50:01 2009- 1/2 Site Status:okay
Mon May 18 13:50:01 2009- 2/2 POP Okay. Messages: 0
Mon May 18 13:51:02 2009- 1/2 Site Status:okay
Mon May 18 13:51:02 2009- 2/2 POP Okay. Messages: 0
Mon May 18 13:52:02 2009- 1/2 Site Status:okay
Mon May 18 13:52:04 2009- 2/2 POP Okay. Messages: 0
Mon May 18 13:53:09 2009- 1/2 Site Status:okay
Mon May 18 13:53:39 2009- 2/2 (Site Status:okay) POP Error:timed out
Mon May 18 13:54:24 2009- 1/2 Site Status:okay
Mon May 18 13:54:54 2009- 2/2 (Site Status:okay) POP Error:timed out
Mon May 18 13:55:03 2009- 1/2 Site Status:okay
Mon May 18 13:55:33 2009- 2/2 (Site Status:okay) POP Error:timed out
Mon May 18 13:56:06 2009- 1/2 Site Status:okay
Mon May 18 13:56:36 2009- 2/2 (Site Status:okay) POP Error:timed out
Mon May 18 13:57:06 2009- 1/2 Site Status:okay
Mon May 18 13:57:36 2009- 2/2 (Site Status:okay) POP Error:timed out
Mon May 18 13:58:37 2009- 1/2 Site Status:okay
What would be causing this? The logs show that the web server is up and running just fine during these times.

I've submitted a ticket to my support for the server, but they keep saying it's fine (they telnet to it once, it connects and they report it is fine).

Last edited by Zeno McDohl; 05-18-2009 at 01:10 PM.
 
Old 05-19-2009, 06:11 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
How is the load of the server at the moment it times out ?
 
Old 05-19-2009, 01:53 PM   #3
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 322

Original Poster
Rep: Reputation: 30
Hm, wonder if there's a way to print that in Python. Would help it be more accurate instead of manually looking.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcpcd timing out waiting for server response theofb Linux - Newbie 2 09-15-2008 08:43 AM
how to start timing and print the timing result on portions of java codes ?? alred Programming 2 05-15-2006 10:00 AM
Web server timing out half the time and it's live! critical Linux - Software 2 08-20-2005 08:56 PM
Problem with nfs server timing out DarkSun4241 Linux - Networking 1 08-10-2005 09:14 AM
squid proxy server is timing out sconstable Linux - Networking 0 11-20-2003 06:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration