From: <Sim...@cs...> - 2009-10-21 08:00:52
|
Sigh - nice idea but no :-) - its not due to what I've described below. Back to the drawing board.... Cheers, Simon ________________________________________ From: Sim...@cs... [Sim...@cs...] Sent: Wednesday, 21 October 2009 2:25 PM To: jam...@go...; geo...@li... Subject: [ExternalEmail] Re: [GeoNetwork-devel] "unable to open resource main-db" I suspect this is due to the Update service (which calls EditUtils) not reusing a single Dbms connection but opening two or even three to do its work (left over from the way it used to work maybe) - this, coupled with the 'leave the resource to go out of scope' approach ends up eventually with all Dbms connections in the pool being locked and the error message 'unable to open resource....' - I'm testing now to confirm - but I don't think there is any reason why Update and EditUtils should not reuse one Dbms connection so this will be committed anyway. Cheers, Simon ________________________________________ From: James Wilson [jam...@go...] Sent: Wednesday, 21 October 2009 3:02 AM To: geo...@li... Subject: Re: [GeoNetwork-devel] "unable to open resource main-db" Heikki, I'm also seeing this problem after doing repeated saves. I'm using oracle, with pool size = 10 and reconnectTime=undefined. Problem is not easily repeatable, but happens regularly. Is this a problem with the connection pool running out of objects? Reading the code, I'm somewhat confused as to how the connection pool is supposed to work, and resources get released. By my reading, the only place connections get released is by calling close on connection pool object (DbmsPool) with the resource (Dbms) as an argument, which unlocks the resource. However, in the code, this never seems to be done. The default pattern seems to be to get a new resource with dbms = context.getResourceManager().open(Geonet.Res.MAIN_DB) and then to leave the resource to go out of scope Yours, mystified, and frustrated at not being able to track down the error.... Anybody else got any ideas? James Heikki Doeleman wrote: > > hello lists, > > I'm seeing this error, every so often : > > **"unable to open resource main-db after 20attempts" > > This happens when you're using the editor for a bit. When it happens, you > must either restart GeoNetwork or wait a while (session timeout?). > > It started to happen for us after moving to Postgres and moving to a GN > 2.4-based application. > > A search on Google shows that quite lots of GeoNetwork nodes have it. > Moreover, from a WHO node that displays a stacktrace, it seems they have > it > when using MySQL, not Postgres ( > http://209.85.229.132/search?q=cache:5Z0sxBf6fS8J:apps.who.int/geonetwork/srv/en/metadata.show%3Fid%3D74%26currTab%3Dsimple+%22unable+to+open+resource+main-db%22+%22Communications+link+failure+due+to+underlying+exception:%22&cd=1&hl=en&ct=clnk > ). > > Does anybody know what to do to prevent this from ever happening ? My JDBC > settings in config.xml are poolSize=10, reconnectTime=undefined > (defaulting > to Jeeves). > > > Thank you so much > > Kind regards > Heikki Doeleman > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > GeoNetwork-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geonetwork-devel > GeoNetwork OpenSource is maintained at > http://sourceforge.net/projects/geonetwork > -- View this message in context: http://n2.nabble.com/unable-to-open-resource-main-db-tp3728570p3859528.html Sent from the GeoNetwork developer mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ GeoNetwork-devel mailing list Geo...@li... https://lists.sourceforge.net/lists/listinfo/geonetwork-devel GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ GeoNetwork-devel mailing list Geo...@li... https://lists.sourceforge.net/lists/listinfo/geonetwork-devel GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork |