[CalendarServer-dev] 4.2 server stuck after DB outage

Andre LaBranche dre at apple.com
Mon Apr 22 08:39:59 PDT 2013


Hi,

It doesn't seem likely to me that a fast shutdown of postgres could cause this sort of error. Fast shutdown simply means that clients are not given the chance to finish their running transactions before they are disconnected, which is totally safe (those in-flight txns get rolled back). Given the complaints in the log about SSL, I tend to suspect the software update more than anything else...

What OS and version are you using? Are you using Calendar Server in 'svn' mode where it spawns postgres itself, or are you managing postgres externally? If the latter, can you still start postgres and connect using psql?

-dre

On Apr 22, 2013, at 3:39 AM, Axel Rau <Axel.Rau at Chaos1.DE> wrote:

> 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
> 
> _______________________________________________
> calendarserver-dev mailing list
> calendarserver-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/calendarserver-dev



More information about the calendarserver-dev mailing list