[
https://issues.apache.org/jira/browse/MARMOTTA-624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergio Fernández reassigned MARMOTTA-624:
-----------------------------------------
Assignee: Sergio Fernández
> Apache Marmotta refusing to load queries - Postgresql No remaining connection
> -----------------------------------------------------------------------------
>
> Key: MARMOTTA-624
> URL: https://issues.apache.org/jira/browse/MARMOTTA-624
> Project: Marmotta
> Issue Type: Bug
> Affects Versions: 3.3.0
> Environment: Postgresql: 9.3.10
> Server version: Apache Tomcat/7.0.52 (Ubuntu)
> OS Name: Ubuntu 14.04
> OS Version: 3.13.0-74-generic
> Architecture: amd64
> JVM Version: 1.7.0_91-b02
> JVM Vendor: Oracle Corporation
> Marmotta: 3.3.0
> Reporter: Rinciog Octavian
> Assignee: Sergio Fernández
> Labels: bug, postgresql
>
> Hello,
> I'm running an Apache Marmotta 3.3.0, configured with postgresql 9.3.10 and
> Tomcat 7, and from time to time, the resources from Marmotta cannot be
> accessed.
> In tomcat logs the following lines appear :
> {code}
> 0:10:19.937 ERROR - Error retrieving the resource XXX: database error, could
> not load URI resource
> 10:10:27.168 ERROR - database error, could not load URI resource
> org.postgresql.util.PSQLException: FATAL: remaining connection slots are
> reserved for non-replication superuser connections
> {code}
> Right now, in /etc/postgresql/9.3/main/postgresql.conf I have the following
> setting:
> {code}- max_connections = 100{code}
> There are 97 opened connection to postgresql, all from tomcat process
> {code}
> root@test# netstat -ap | grep postgresql
> tcp6 0 0 localhost:33756 localhost:postgresql
> ESTABLISHED 22632/java
> tcp6 0 0 localhost:33733 localhost:postgresql
> ESTABLISHED 22632/java
> tcp6 0 0 localhost:33757 localhost:postgresql
> ESTABLISHED 22632/java
> ...
> {code}
> {code}
> root@test# netstat -ap | grep postgresql | wc -l
> 97
> {code}
> {code}
> root@test# ps -ef | grep 22632
> tomcat7 22632 1 0 Jan13 ? 00:14:40
> /usr/lib/jvm/default-java/bin/java
> -Djava.util.logging.config.file=/var/lib/tomcat7/conf/logging.properties
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.awt.headless=true -Xmx2048m -XX:+UseConcMarkSweepGC
> -Djava.endorsed.dirs=/usr/share/tomcat7/endorsed -classpath
> /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
> -Dcatalina.base=/var/lib/tomcat7 -Dcatalina.home=/usr/share/tomcat7
> -Djava.io.tmpdir=/tmp/tomcat7-tomcat7-tmp
> org.apache.catalina.startup.Bootstrap start
> {code}
> Also from pg_top output:
> {code}
> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
> 23249 postgres 20 0 246M 125M sleep 0:26 0.00% 0.00% postgres: X X
> 127.0.0.1(33677) idle in transaction
>
> 23217 postgres 20 0 246M 125M sleep 0:20 0.00% 0.00% postgres: X X
> 127.0.0.1(33675) idle in transaction
>
> 23446 postgres 20 0 247M 129M sleep 0:19 0.00% 0.00% postgres: X X
> 127.0.0.1(33683) idle in transaction
> {code}
> But there is no live connection from an outside point to tomcat.
> After tomcat restart, all is very good, but in a couple of hours, the
> problems appears again.
> So, how can I fix this problem?
> Thank you,
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)