Nuxeo DM 5.5 and PostgreSQL Locks
Hi all,
We are using Nuxeo DM 5.5 with PostgreSQL 8.4.and we have a singular (almost for us) behavior of the system. For long period of time Nuxeo works well, we are able to insert, upload delete document and so on. Then after a several operation the system do not respond, but the server (tomcat) is up and the database also. After some investigation we have noted that during the period where nuxeo do not respond there are some transaction running in the database that i think create some locks. After 10-15 minutes the transactions are closed and Nuxeo respond and .. incredible the last operation has been done correctly. Any suggestions in order to solve this issue.. I attach the evidence of locks during the session where Nuxeo do not respond. Apologies in case the image is too big. Thanks in advance. Giancarlo
To enable keep-alive on PostgreSQL connections you need to change:
- the datasources (
server.xml
ornuxeo.xml
or the relevant templates) to addtcpKeepAlive=true
to the<Resource>
for your datasource(s), - the repository configuration (
default-repository-config.xml
or its template) to add<property name="TcpKeepAlive">true</property>
.
setTcpKeepAlive
of the XA datasource is called (checked with a breakpoint) when I add <property name="TcpKeepAlive">true</property>
to the repository config.
Also note that you should not modify existing templates, they could be overwritten on upgrades (including hotfixes). You should create a new custom template containing a copy of the file you want to modify and use it. Please read on how to use templates in Nuxeo.
RepositoryBackend.initialize
to see why the call to BeanUtils.setProperty
doesn't do what you want, I don't see how to debug this.Giancarlo
jstack
command to get a stack trace of the Nuxeo server while it's doing something unknown. Having the stack trace would help us understand what it's doing.Also, if what you're posting is not an answer to the initial question, then don't post it as an answer but as a comment.
Resetting connection
means that connection to the database was lost and had to be reset. You also see things likeAn I/O error occured while sending to the backend
orConnection timed out
.So there is a network problem or on the database side.