1

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

  1. Apache(for Load balancing. This will divert all GIS links to ServerIP1:8081 and ServerIP2:8080)
  2. Tomcat(ServerIP1:8080)
  3. GIS Application
  4. Geoserver Files
  5. GIS Database(PostgreSQL 8.4,PostGIS 1.5)

Server2 contains

  1. Tomcat(ServerIP2:8081)
  2. GIS Application
  3. 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: enter image description here

If anyone faced a problem like this please guide me to solve this problem.

  • probably not relevant but, why are you using 2 servers and the same stuff in each? It sounds complicated to me, I mean, it may be easier. – Gery Oct 25 '13 at 6:22
  • Dear Gery thank you for the reply.. So many clients are accessing our application and maps. So that for improving geoserver map and application speed i have done this. and i'm 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 kind of errors in postgresql log. – Ramesh T R Oct 25 '13 at 6:32
  • how about if you just connect both servers (ie. their power capabilities) first and then use one to do all the stuff? Wouldn't be that easier? Btw, are you using windows or Linux? based on that errors, I'd think that PostgreSQL doesn't understand that there are two servers, or have to share its information, but if it does, then apache is not helping at all. – Gery Oct 25 '13 at 6:37
  • I'm using 2 Windows Server. if i stop tomcat in Server1 then there is no problem. Postgresql connection count is normal . Bt if i restart Server1 tomcat then suddenly the connections will increase. – Ramesh T R Oct 25 '13 at 6:39
  • That time i'm getting "unexpected EOF on client connection" this errors only in postgresql log – Ramesh T R Oct 25 '13 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.