I'm using Tomcat, Apache (for Load Balencing),OpenLayers - 2.11,GeoServer 2.13, ExtJS 3.4, PostgreSQL 8.4,PostGIS 1.5 and Java for developing GIS based web applications.
I have 2 Server.
Server1 contains
- Apache(for Load balancing. This will divert all GIS links to ServerIP1:8081 and ServerIP2:8080)
- Tomcat(ServerIP1:8080)
- GIS Application
- Geoserver Files
- GIS Database(PostgreSQL 8.4,PostGIS 1.5)
Server2 contains
- Tomcat(ServerIP2:8081)
- GIS Application
- Geoserver Files
All Map link will directly go to Apache from there after the load balancing process that will divert into Server1 or Server2.
LoadBalancer code in Apache
<Proxy balancer://clusterABCD>
BalancerMember http://ServerIP1:8080
BalancerMember http://ServerIP2:8081
Order allow,deny
Allow from all
</Proxy>
ProxyPass / balancer://clusterABCD/
ServerIP1 and ServerIP2 contains same GIS applications and the same Geoserver files. Both Server accessing datas from ServerIP1:5433 Postgres Database Files.
While running select count(client_addr),client_addr from pg_stat_activity group by client_addr;
this query
i'm getting from ServerIP1 Postgres counts are increasing continuously(count upto 50 or 100 or 200 like) and after some time intervals(not a fixed time)
that will come down to 1 then 2 then starting to increase the count.
If i stop ServerIP1:8080 tomcat then there is no problem. Then i have checked which query is taking this much of connections in PostgreSQL But, i'm getting results only IDLE. And getting only
2013-10-24 18:23:43 IST ERROR: relation "public.gt_pk_metadata" does not exist at character 15
2013-10-25 06:15:31 IST LOG: unexpected EOF on client connection
these errors in postgresql logs.
Geoserver Store:
If anyone faced a problem like this please guide me to solve this problem.