grails - PostgreSQL Exception: “An I/O error occured while sending to the backend” -
i run 2 web app in machine , 1 db in machine.(they utilize same db) 1 can run well,but 1 downwards after 4 hours.
here error information:
error 2014-11-03 13:31:05,902 [http-bio-8080-exec-7] error spi.sqlexceptionhelper - i/o error occured while sending backend. | error 2014-11-03 13:31:05,904 [http-bio-8080-exec-7] error spi.sqlexceptionhelper - connection has been closed.
postgresql logs:
2014-10-26 23:41:31 cdt warning: pgstat wait timeout 2014-10-27 01:13:48 cdt warning: pgstat wait timeout 2014-10-27 03:55:46 cdt log: not receive info client: connection timed out 2014-10-27 03:55:46 cdt log: unexpected eof on client connection
who caused problem, app or database? or net?
reason:
at point clear tcp connection sitting idle broken, our app still assumed open. idle connections, mean connections in pool aren’t in active utilize @ moment application.
after search, came conclusion network firewall between app , database dropping idle/stale connections after 1 hour. seemed mutual problem many people have faced.
solution:
in grails, can set in datasource.groovy.
environments { development { datasource { //configure dbcp properties { maxactive = 50 maxidle = 25 minidle = 1 initialsize = 1 minevictableidletimemillis = 60000 timebetweenevictionrunsmillis = 60000 numtestsperevictionrun = 3 maxwait = 10000 testonborrow = true testwhileidle = true testonreturn = false validationquery = "select 1" } } } }
postgresql grails
No comments:
Post a Comment