problem using python-ldap under fcgi

Matt Bartolome mattxbart at
Tue Aug 26 02:12:13 CEST 2008

I've got a little problem and I'm not sure how to track down the error
I'm getting. My web server is spitting back a 504 gateway timeout
which isn't helpful at all so I'm hoping someone here can point me in
the right direction.

When I attempt to:

            l = ldap.initialize(settings.AD_LDAP_URL)

I get the gateway timeout but this works perfectly fine in the python
interpreter. I'm running django as an fcgi preforked socket and
pointing my nginx fcgi server to it. All web requests work fine until
I hit the l.simple_bind_s() function so I'm having a heck of a time
finding out what the actual error is. The only other output I've been
able to produce is:

*** glibc detected *** python: free(): invalid pointer: 0x08e9b1ec ***

this is when I don't background the fcgi process. I'm fully aware that
this may have nothing to do with python-ldap but just hoping someone
here may have a clue for me.

python 2.5.2
python-ldap 2.3.5
ubuntu 7.10

my fcgi socket is spawned like so (if it helps):
python /var/django/gis/ runfcgi --settings=intranet_settings
method=prefork \
  pidfile=/tmp/ \


More information about the python-ldap mailing list