vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello,I'm using JSP for accessing postgre My postgre version is 8.1 running on suse enterprise 10 linux machine. My JSP container is Apache Tomcat 5.5. My connection method is JNDI(pooling). Recently I'm having trouble after my web application is being accessed by many users. My error log shows something like this : ====================================== .... org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command at org.postgresql.core.v3.QueryExecutorImpl.receiveEr rorResponse( QueryExecutorImpl.java:1525) at org.postgresql.core.v3.QueryExecutorImpl.processRe sults( QueryExecutorImpl.java:1309) at org.postgresql.core.v3.QueryExecutorImpl.execute(Q ueryExecutorImpl.java :188) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut e( AbstractJdbc2Statement.java:452) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eWithFlags( AbstractJdbc2Statement.java:340) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eQuery( AbstractJdbc2Statement.java:239) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.ex ecuteQuery( DelegatingStatement.java:205) at org.diknas.sarpras.UtilDiknas.executeQuery(UtilDik nas.java:226) at org.apache.jsp.modul.monitoring.gofoto_jsp._jspSer vice (gofoto_jsp.java:157) at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet .java:802) at org.apache.jasper.servlet.JspServletWrapper.servic e( JspServletWrapper.java:334) at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet .java:802) at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.do Filter( ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.inv oke( ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.pro cessRequest( ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doF orward( ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.for ward( ApplicationDispatcher.java:301) at org.diknas.sarpras.monitoring.MonitoringFotoProces sor.doEntryView( MonitoringFotoProcessor.java:115) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.diknas.sarpras.monitoring.MonitoringFotoProces sor.doSelection( MonitoringFotoProcessor.java:96) at org.diknas.sarpras.monitoring.MonitoringFotoProces sor.doProcess( MonitoringFotoProcessor.java:54) at org.diknas.sarpras.monitoring.MonitoringProcessor. doFotoView( MonitoringProcessor.java:133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.diknas.sarpras.monitoring.MonitoringProcessor. doSelection( MonitoringProcessor.java:91) at org.diknas.sarpras.monitoring.MonitoringProcessor. doProcess( MonitoringProcessor.java:50) at org.diknas.sarpras.Controller.doMonitoringEntry(Co ntroller.java:143) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.diknas.sarpras.Controller.doSelection(Controll er.java:97) at org.diknas.sarpras.Controller.doGet(Controller.jav a:66) at javax.servlet.http.HttpServlet.service(HttpServlet .java:689) at javax.servlet.http.HttpServlet.service(HttpServlet .java:802) at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.do Filter( ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invo ke( StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invo ke( StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java :126) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invok e( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java :148) at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java :869) at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection (Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket( PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt( LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run( ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) .... ======================================= It seems that the exception came from Postgre : org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command What's this ? I've tried to googling around and found something about resource limiter or something like that, but I don't seems understand the solution. Is there any straight forward solution for my trouble here ? Cause I got really stuck here. How to configure postgre to fix this ? thanks. |
| |||
| Wong Jowo wrote: > Hello,I'm using JSP for accessing postgre > My postgre version is 8.1 running on suse enterprise 10 linux machine. > My JSP container is Apache Tomcat 5.5. > My connection method is JNDI(pooling). > Recently I'm having trouble after my web application is being accessed by > many users. > My error log shows something like this : > ====================================== > ... > org.postgresql.util.PSQLException: FATAL: terminating connection due to > administrator command [snip stack of java exception msgs] > ======================================= > > It seems that the exception came from Postgre : > org.postgresql.util.PSQLException: FATAL: terminating connection due to > administrator command What do the PostgreSQL logs say (oh, and it's PostgreSQL or perhaps Postgres, not "Postgre")? For that matter, what do the system logs say? What was the system load at the time? I'm assuming you haven't got any code that disconnects backends directly. > What's this ? I've tried to googling around and found something about > resource limiter or something like that, but I don't seems understand the > solution. > Is there any straight forward solution for my trouble here ? Cause I got > really stuck here. > How to configure postgre to fix this ? I'm guessing that what's happening is you're running out of memory on the machine and the Linux out-of-memory (oom) killer is killing processes at random (and hitting PostgreSQL). You'll either need to limit the number of concurrent connections, reduce the memory usage of PostgreSQL or your other applicatons or add more memory. To be honest, if you're running out of memory then performance is going to be horrible anyway. -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| |||
| Please cc: the mailing list - that lets everybody help. Wong Jowo wrote: > The postgres error message is the same : > FATAL: terminating connection due to administrator command > > But in log I saw that ther is on kind of error that happened before the > "FATAL: terminating connection due to administrator command", it's : > "FATAL: sorry, too many clients already". Don't assume they're linked. If you've got lots of connections active then the oom-killer might be acting too. > I'm using the default postgres configuration on postgresql.conf. > > So, what should I do ? Well, you're running connection pooling, so it's odd that you're running out of connections, but you can alter that setting in postgresql.conf - max_connections should default to 100. You certainly want to adjust your memory usage etc. in postgresql.conf too. This link is a good place to start http://www.powerpostgresql.com/PerfList -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| ||||
| The postgres error message is the same : FATAL: terminating connection due to administrator command But in log I saw that ther is on kind of error that happened before the "FATAL: terminating connection due to administrator command", it's : "FATAL: sorry, too many clients already". I'm using the default postgres configuration on postgresql.conf. So, what should I do ? |