[CalendarServer-dev] 4.2 server stuck after DB outage

Axel Rau Axel.Rau at Chaos1.DE
Mon Apr 22 03:39:30 PDT 2013


PostgreSQL backend did a fast shutdown due to software update.
After reconnection, caldavd throws
---
twisted/internet/defer.py:551:_runCallbacks
twext/web2/http.py:505:writeResponse
twext/web2/stream.py:750:beginProducing
twext/web2/channel/http.py:714:registerProducer
twisted/internet/_newtls.py:230:registerProducer
---
Followed by
---
twisted/internet/defer.py", line 551, in _runCallbacks
	current.result = callback(current.result, *args, **kw)
twext/web2/server.py", line 643, in _processingReallyFailed
    self.writeResponse(response)
twext/web2/http.py", line 505, in writeResponse
    d = stream.StreamProducer(response.stream).beginProducing(self.chanRequest)
twext/web2/stream.py", line 750, in beginProducing
    self.consumer.registerProducer(self, True)
twext/web2/channel/http.py", line 707, in registerProducer
    raise ValueError, "registering producer %s before previous one
    	(%s) was unregistered" % (producer, self.producer)
	exceptions.ValueError: registering producer <twext.web2.stream.StreamProducer
		object at 0x808dd4d90> before previous one
			(<twext.web2.stream.StreamProducer object at 0x808564510>) was unregistered
---
Followed by
---
twext/enterprise/adbapi2.py", line 230, in _reallyExecSQL
txdav/base/datastore/dbapiclient.py", line 76, in execute
    self.realCursor.execute(sql, args)
pgdb.py", line 323, in execute
    return self.executemany(operation, [params])
pgdb.py", line 338, in executemany
    self._cnx.source().execute(sql)
pg.ProgrammingError: FATAL:  terminating connection due to administrator command
SSL connection has been closed unexpectedly
---
Repeated several times.
There was no indication about malfunction to clients.
While shutting down caldavd, I saw 10 disconnects in the PostgreSQL log.

Axel
PS: detailed log available on request
---
PGP-Key:29E99DD6  ☀ +49 151 2300 9283  ☀ computing @ chaos claudius



More information about the calendarserver-dev mailing list