Python 2.5.2, Apache 2.2, Django 1..2 final

My Django application attempts to connect with a particular port. When that port is busy, I recieve the mistake 10048 "Address already being used" from apache. I understand in which the error is originating from. How do you catch this apache error?

More information:

error at /report/5/2009/08/01/

(10048, 'Address already in use')

Request Method:     GET
Request URL:    http://192.168.0.21/report/5/2009/08/01/
Exception Type:     error
Exception Value:    

(10048, 'Address already in use')

Exception Location:     C:\Python25\Lib\httplib.py in connect, line 683
Python Executable:  C:\Program Files\Apache Software Foundation\Apache2.2\bin\httpd.exe
Python Version:     2.5.2
Python Path:    ['D:\\django\\system', 'C:\\Python25\\lib\\site-packages\\setuptools-0.6c9-py2.5.egg', 'C:\\Python25\\lib\\site-packages\\python_memcached-1.44-py2.5.egg', 'C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs', 'c:\\mapnik_0_6_0\\site-packages', 'C:\\Program Files\\Apache Software Foundation\\Apache2.2', 'C:\\WINDOWS\\system32\\python25.zip', 'C:\\Python25\\Lib', 'C:\\Python25\\DLLs', 'C:\\Python25\\Lib\\lib-tk', 'C:\\Program Files\\Apache Software Foundation\\Apache2.2\\bin', 'C:\\Python25', 'C:\\Python25\\lib\\site-packages', 'C:\\Python25\\lib\\site-packages\\PIL', 'C:\\Program Files\\GeoDjango\\Django-1.0.2-final']

Server time: don, 10 Sep 2009 11:20:45 +0200

If you are calling httplib.connect from your code, then your try/except ought to be around that direct call. Or perhaps is the phone call happening not directly...? Regrettably Apache isn't providing you with a stack trace, therefore if you are getting problems finding precisely what call sequence is involved you can put an extensive try/except in the greatest level open to you, and save a printout from the traceback so that you can identify the phone call site involved (or, edit your question to exhibit the traceback, and that we will help you locate it). Begin to see the traceback module in Python's standard library for additional regarding how to format a traceback within an except clause.