Re: [basedb-devel] intermittent hibernate errors when using BASE API
Bob MacCallum wrote: > Hi Nicklas, > > I'll double check but I think we're sharing one DbControl across the whole > webapp, so that will be the first place to look. This will definitely give you a lot of problems since a DbControl is not thread-safe. You may also run into memory problems since every item that has been loaded from the database will be stored in a cache. If you use one DbControl for everything you will end up with the entire database as Java objects in memory. In other words, every request to the web application needs it's own DbControl. /Nicklas > > Thanks for the hint. Will post back when I have a solution. > > cheers, > Bob. > > > Nicklas Nordborg writes: > > Bob MacCallum wrote: > > > Quick follow up to: > > > > http://www.mail-archive.com/basedb-devel@lists.sourceforge.net/msg00316.html > > > > > > The problem seems to be triggered by concurrent access to our BASE-based > web > > > application (for example, me and googlebot). > > > > > > That doesn't bring me any closer to understanding what exactly is going > on, > > > but I thought I would share. > > > > > > I wonder if similar stacktraces occur on a busy multi-user BASE server? > > > > > > > Are you sharing objects (eg. an ItemQuery, DbControl, etc.) between > > different threads? I think the problem can be caused by multiple threads > > that are accessing the same non-threadsafe object at the same time. > > > > /Nicklas > > > > > > - > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > Build the coolest Linux based applications with Moblin SDK & win great > prizes > > Grand prize is a trip for two to an Open Source event anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > ___ > > basedb-devel mailing list > > basedb-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/basedb-devel > - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ basedb-devel mailing list basedb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/basedb-devel
Re: [basedb-devel] intermittent hibernate errors when using BASE API
Hi Nicklas, I'll double check but I think we're sharing one DbControl across the whole webapp, so that will be the first place to look. Thanks for the hint. Will post back when I have a solution. cheers, Bob. Nicklas Nordborg writes: > Bob MacCallum wrote: > > Quick follow up to: > > http://www.mail-archive.com/basedb-devel@lists.sourceforge.net/msg00316.html > > > > The problem seems to be triggered by concurrent access to our BASE-based > > web > > application (for example, me and googlebot). > > > > That doesn't bring me any closer to understanding what exactly is going on, > > but I thought I would share. > > > > I wonder if similar stacktraces occur on a busy multi-user BASE server? > > > > Are you sharing objects (eg. an ItemQuery, DbControl, etc.) between > different threads? I think the problem can be caused by multiple threads > that are accessing the same non-threadsafe object at the same time. > > /Nicklas > > > - > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ___ > basedb-devel mailing list > basedb-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/basedb-devel -- Bob MacCallum | VectorBase Developer | Kafatos/Christophides Groups | Division of Cell and Molecular Biology | Imperial College London | Phone +442075941945 | Email [EMAIL PROTECTED] - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ basedb-devel mailing list basedb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/basedb-devel
Re: [basedb-devel] intermittent hibernate errors when using BASE API
Bob MacCallum wrote: > Quick follow up to: > http://www.mail-archive.com/basedb-devel@lists.sourceforge.net/msg00316.html > > The problem seems to be triggered by concurrent access to our BASE-based web > application (for example, me and googlebot). > > That doesn't bring me any closer to understanding what exactly is going on, > but I thought I would share. > > I wonder if similar stacktraces occur on a busy multi-user BASE server? > Are you sharing objects (eg. an ItemQuery, DbControl, etc.) between different threads? I think the problem can be caused by multiple threads that are accessing the same non-threadsafe object at the same time. /Nicklas - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ basedb-devel mailing list basedb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/basedb-devel
[basedb-devel] intermittent hibernate errors when using BASE API
Quick follow up to: http://www.mail-archive.com/basedb-devel@lists.sourceforge.net/msg00316.html The problem seems to be triggered by concurrent access to our BASE-based web application (for example, me and googlebot). That doesn't bring me any closer to understanding what exactly is going on, but I thought I would share. I wonder if similar stacktraces occur on a busy multi-user BASE server? -- Bob MacCallum | VectorBase Developer | Kafatos/Christophides Groups | Division of Cell and Molecular Biology | Imperial College London | Phone +442075941945 | Email [EMAIL PROTECTED] - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ basedb-devel mailing list basedb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/basedb-devel
[basedb-devel] intermittent hibernate errors when using BASE API
Hi all, We very recently released our web application which uses BASE as the back end. It's serving microarray data to non-microarray specialists in the insect vector community (e.g. mosquito/malaria research): http://funcgen.vectorbase.org/ExpressionData/ In a nutshell, we have developed a simplified API which deals with just samples, hybs, experiments, arrays and reporters - and the normalised spot intensity data from one bioassayset (annotated in BASE as "final") per experiment. Then we added some on-the-fly statistics (reporter based, or gene-averaged) to the API and built a web application to serve it all. It's working really well except that I'm getting some very intermittent half-rendered pages with stacktraces in the logs like this: 15-Jul-2008 01:32:52 org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.IllegalArgumentException: Filter [isRemoved] currently not enabled at org.hibernate.impl.SessionImpl.getFilterParameterValue(SessionImpl.java:1049) at org.hibernate.engine.QueryParameters.processFilters(QueryParameters.java:401) at org.hibernate.loader.Loader.processFilters(Loader.java:1595) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1517) at org.hibernate.loader.Loader.scroll(Loader.java:2292) at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:441) at org.hibernate.hql.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:390) at org.hibernate.engine.query.HQLQueryPlan.performScroll(HQLQueryPlan.java:245) at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:1206) at org.hibernate.impl.QueryImpl.scroll(QueryImpl.java:67) at net.sf.basedb.core.hibernate.QueryWrapper.scroll(QueryWrapper.java:116) at net.sf.basedb.core.HibernateUtil.loadIterator(HibernateUtil.java:1502) at net.sf.basedb.core.ItemQuery.iterate(ItemQuery.java:126) then one of the following: at org.vectorbase.funcgen.gesol.DB.base2.Base2AnnotationAdaptor.fetchBySample(Base2AnnotationAdaptor.java:153) at org.vectorbase.funcgen.gesol.DB.base2.Base2SampleAdaptor.fetchByHybridisation(Base2SampleAdaptor.java:119) where our fetchByHybridisation method basically does this: 116:Hybridization hyb = Hybridization.getById(dc, hybID); 117:ItemQuery sourceQ = hyb.getCreationEvent().getSources(); 118:sourceQ.include(Include.SHARED); sourceQ.setDistinct(true); 119:Iterator it = sourceQ.iterate(dc); and fetchBySample does this: 150:net.sf.basedb.core.Sample baseSample = net.sf.basedb.core.Sample.getById(dc, sample.getDBID()); 151:ItemQuery typeIq = AnnotationType.getQuery(Item.SAMPLE); 152:typeIq.include(Include.SHARED); typeIq.setDistinct(true); 153:ItemResultIterator typeIt = typeIq.iterate(dc); More rarely (due to the web pages being accessed less often), other ItemQueries cause a similar stacktrace when list() or iterate() is called. Sometimes the problem filter is "ownedByOrSharedTo" instead of "isRemoved". I've trawled our logs and don't see this error ever being caused by the BASE web interface or plugins. So it looks like our use of the BASE API is problematic somehow. It logs in as a guest user, but otherwise isn't doing anything special AFAIK. Note that the errors date back to before the public release (when I was too busy to look at them in detail). It doesn't seem to be related to a BASE or tomcat upgrade. I googled and didn't find any discussion of this phenomenon. I made sure not to use any BASE-specific search terms. You can see our BASE version info and config at http://funcgen.vectorbase.org/base2 any ideas? many thanks, Bob. -- Bob MacCallum | VectorBase Developer | Kafatos/Christophides Groups | Division of Cell and Molecular Biology | Imperial College London | Phone +442075941945 | Email [EMAIL PROTECTED] - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ basedb-devel mailing list basedb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/basedb-devel