Nuxeo DM 5.5 and PostgreSQL Locks
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
jstackcommand 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 connectionmeans that connection to the database was lost and had to be reset. You also see things like
An I/O error occured while sending to the backendor
Connection timed out.
So there is a network problem or on the database side.
To enable keep-alive on PostgreSQL connections you need to change:
- the datasources (
nuxeo.xmlor the relevant templates) to add
<Resource>for your datasource(s),
- the repository configuration (
default-repository-config.xmlor its template) to add
setTcpKeepAliveof 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.initializeto see why the call to
BeanUtils.setPropertydoesn't do what you want, I don't see how to debug this.