Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [smila-user] java.lang.OutOfMemoryError: PermGen spacewhen Crawling and Searching

Hi Oliver,

 

The problems you described have nothing to do with the FileSystem crawler.

You used rather experimental functionality of LuceneService (via JMX I guess) which is not even documented.

I analyzed different situations and calls of methods of LuceneService and reproduced the behavior you described below.

 

Therefore I suggest you not to create, delete and/or rename indices via JMX but let SMILA manage them for you.

 

Cheers

Igor

 

 

Von: smila-user-bounces@xxxxxxxxxxx [mailto:smila-user-bounces@xxxxxxxxxxx] Im Auftrag von "Oliver Schäfer"
Gesendet: Sonntag, 2. Januar 2011 09:25
An: Smila project user mailing list
Betreff: Re: [smila-user] java.lang.OutOfMemoryError: PermGen spacewhen Crawling and Searching

 

I think it's a problem with the FileSystem-Crawler:
Evertime when I start a crawl i can't delete, reorganize or rename the index anymore. I allways get this exception (in the jConsole):
Problem invoking deleteIndex: java.lang.reflect.InvocationTargetException
When i restart SMILA everthing works fine --> until i crawl again... than i get the error again.

Some log-entrys:

 2011-01-02 08:59:53,283 INFO  [Thread-12                                    ]  filesystem.FileSystemCrawler                  - Initializing FileSystemCrawler...
 2011-01-02 08:59:53,285 INFO  [Thread-12                                    ]  management.ManagementRegistration             - [Management Registration] Registering new agent [Crawlers/FileSystem/drools_xmldump - 20450769]
 2011-01-02 08:59:53,285 INFO  [Thread-12                                    ]  management.ManagementRegistration             - [Management Registration] Registering new agent [Crawlers/FileSystem/drools_xmldump - 20450769] in old controller [org.eclipse.smila.management.jmx.JmxManagementController]
 2011-01-02 08:59:53,285 INFO  [Thread-12                                    ]  jmx.JmxManagementController                   - SMILA:C0=Crawlers,C1=FileSystem,Agent=drools_xmldump - 20450769
 2011-01-02 08:59:55,221 INFO  [Thread-13                                    ]  filesystem.FileSystemCrawler                  - Producer finished!
 2011-01-02 08:59:55,238 INFO  [Thread-12                                    ]  filesystem.FileSystemCrawler                  - Closing FileSystemCrawler...
 2011-01-02 08:59:55,238 INFO  [Thread-12                                    ]  impl.CrawlThread                              - Removing deltaindexing lock on datasource drools_xmldump
 2011-01-02 08:59:55,238 INFO  [Thread-12                                    ]  impl.CrawlThread                              - Finished session 0a58756c-d688-4379-a4f4-64fbb6a30dcb and removed Deltaindexing lock on datasource drools_xmldump
 2011-01-02 08:59:55,238 INFO  [Thread-12                                    ]  impl.CrawlThread                              - Unregistering crawling thread drools_xmldump
 2011-01-02 08:59:55,238 INFO  [Thread-12                                    ]  impl.CrawlThread                              - Crawling thread drools_xmldump unregistered
 2011-01-02 08:59:55,238 INFO  [Thread-12                                    ]  impl.CrawlThread                              - Crawling thread drools_xmldump stopped.
 2011-01-02 09:00:05,030 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  lucene.LuceneManagementAgent                  - org.eclipse.smila.search.index.IndexException: java.io.IOException: Unable to delete file: D:\workspaces\drool-smila\trunk\SMILA_0.7\workspace\.metadata\.plugins\org.eclipse.smila.lucene\drools_test_index\_3.cfs
 2011-01-02 09:00:05,030 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  jmx.AgentMBean                                - java.lang.reflect.InvocationTargetException
 2011-01-02 09:04:01,173 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  lucene.LuceneManagementAgent                  - org.eclipse.smila.search.index.IndexException: index does not exist [drools_test_index]
 2011-01-02 09:04:01,173 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  jmx.AgentMBean                                - java.lang.reflect.InvocationTargetException
 2011-01-02 09:04:07,548 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  lucene.LuceneManagementAgent                  - org.eclipse.smila.search.index.IndexException: index does not exist [drools_test_index]
 2011-01-02 09:04:07,549 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  jmx.AgentMBean                                - java.lang.reflect.InvocationTargetException
 2011-01-02 09:04:09,453 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  lucene.LuceneManagementAgent                  - org.eclipse.smila.search.index.IndexException: index does not exist [drools_test_index]
 2011-01-02 09:04:09,454 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  jmx.AgentMBean                                - java.lang.reflect.InvocationTargetException
 2011-01-02 09:04:35,972 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  lucene.LuceneManagementAgent                  - org.eclipse.smila.search.index.IndexException: index does not exist [drools_test_index]
 2011-01-02 09:04:35,972 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  jmx.AgentMBean                                - java.lang.reflect.InvocationTargetException
 2011-01-02 09:10:37,756 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  lucene.LuceneManagementAgent                  - org.eclipse.smila.search.index.IndexException: index does not exist [drools_test_index]
 2011-01-02 09:10:37,756 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  jmx.AgentMBean                                - java.lang.reflect.InvocationTargetException
 2011-01-02 09:10:52,846 WARN  [RMI TCP Connection(1)-192.168.2.110          ]  impl.CrawlerControllerImpl                    - Error while checking for available 'CRAWLER' configurations in file .svn: Unable to find configuration resource .svn in the bundle org.eclipse.smila.connectivity.framework
 2011-01-02 09:10:53,366 WARN  [RMI TCP Connection(1)-192.168.2.110          ]  impl.CrawlerControllerImpl                    - Error while checking for available 'CRAWLER' configurations in file samplejobfile.xml: unexpected element (uri:"", local:"JobFile"). Expected elements are <{}DataSourceConnectionConfig>
 2011-01-02 09:10:53,412 WARN  [RMI TCP Connection(1)-192.168.2.110          ]  impl.CrawlerControllerImpl                    - Error while checking for available 'CRAWLER' configurations in file samplexmldump.xml: unexpected element (uri:"", local:"pages"). Expected elements are <{}DataSourceConnectionConfig>
org.eclipse.smila.utils.config.ConfigurationLoadException: Unable to find configuration resource ldap.properties in the bundle org.eclipse.smila.security.ldap
    at org.eclipse.smila.utils.config.ConfigUtils.getConfigStream(ConfigUtils.java:152)
    at org.eclipse.smila.utils.config.ConfigUtils.getConfigStream(ConfigUtils.java:196)
    at org.eclipse.smila.security.ldap.LDAPSecurityResolver.readConfiguration(LDAPSecurityResolver.java:427)
    at org.eclipse.smila.security.ldap.LDAPSecurityResolver.activate(LDAPSecurityResolver.java:168)
[.... much more]
 2011-01-02 09:18:31,698 ERROR [RMI TCP Connection(1)-192.168.2.110          ]  processing.SampleSecurityConverter            - Could not read configuration property file SampleSecurityConverter.xml
org.eclipse.smila.utils.config.ConfigurationLoadException: Unable to find configuration resource SampleSecurityConverter.xml in the bundle org.eclipse.smila.security.processing
    at org.eclipse.smila.utils.config.ConfigUtils.getConfigStream(ConfigUtils.java:152)
    at org.eclipse.smila.utils.config.ConfigUtils.getConfigStream(ConfigUtils.java:196)
    at org.eclipse.smila.security.processing.SampleSecurityConverter.readConfiguration(SampleSecurityConverter.java:387)
    at org.eclipse.smila.security.processing.SampleSecurityConverter.activate(SampleSecurityConverter.java:146)
[.... much more]
 2011-01-02 09:18:31,698 ERROR [RMI TCP Connection(1)-192.168.2.110          ]  processing.SampleSecurityConverter            - error initializing SampleSecurityConverter
org.eclipse.smila.processing.ProcessingException: Could not read configuration property file SampleSecurityConverter.xml
    at org.eclipse.smila.security.processing.SampleSecurityConverter.readConfiguration(SampleSecurityConverter.java:394)
    at org.eclipse.smila.security.processing.SampleSecurityConverter.activate(SampleSecurityConverter.java:146)
[.... much more]
Caused by: org.eclipse.smila.utils.config.ConfigurationLoadException: Unable to find configuration resource SampleSecurityConverter.xml in the bundle org.eclipse.smila.security.processing
    at org.eclipse.smila.utils.config.ConfigUtils.getConfigStream(ConfigUtils.java:152)
    at org.eclipse.smila.utils.config.ConfigUtils.getConfigStream(ConfigUtils.java:196)
    at org.eclipse.smila.security.processing.SampleSecurityConverter.readConfiguration(SampleSecurityConverter.java:387)
    ... 52 more
 2011-01-02 09:18:31,704 INFO  [Thread-14                                    ]  filesystem.FileSystemCrawler                  - Initializing FileSystemCrawler...
 2011-01-02 09:18:31,705 INFO  [Thread-14                                    ]  management.ManagementRegistration             - [Management Registration] Registering new agent [Crawlers/FileSystem/drools_xmldump - 22576197]
 2011-01-02 09:18:31,705 INFO  [Thread-14                                    ]  management.ManagementRegistration             - [Management Registration] Registering new agent [Crawlers/FileSystem/drools_xmldump - 22576197] in old controller [org.eclipse.smila.management.jmx.JmxManagementController]
 2011-01-02 09:18:31,705 INFO  [Thread-14                                    ]  jmx.JmxManagementController                   - SMILA:C0=Crawlers,C1=FileSystem,Agent=drools_xmldump - 22576197
 2011-01-02 09:18:33,602 INFO  [Thread-15                                    ]  filesystem.FileSystemCrawler                  - Producer finished!
 2011-01-02 09:18:33,619 INFO  [Thread-14                                    ]  filesystem.FileSystemCrawler                  - Closing FileSystemCrawler...
 2011-01-02 09:18:33,619 INFO  [Thread-14                                    ]  impl.CrawlThread                              - Removing deltaindexing lock on datasource drools_xmldump
 2011-01-02 09:18:33,619 INFO  [Thread-14                                    ]  impl.CrawlThread                              - Finished session 317c134a-a554-460e-ae74-fda777521846 and removed Deltaindexing lock on datasource drools_xmldump
 2011-01-02 09:18:33,619 INFO  [Thread-14                                    ]  impl.CrawlThread                              - Unregistering crawling thread drools_xmldump
 2011-01-02 09:18:33,619 INFO  [Thread-14                                    ]  impl.CrawlThread                              - Crawling thread drools_xmldump unregistered
 2011-01-02 09:18:33,619 INFO  [Thread-14                                    ]  impl.CrawlThread                              - Crawling thread drools_xmldump stopped.
 2011-01-02 09:18:49,332 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  lucene.LuceneManagementAgent                  - org.eclipse.smila.search.index.IndexException: index does not exist [drools_test_index]
 2011-01-02 09:18:49,333 ERROR [RMI TCP Connection(2)-192.168.2.110          ]  jmx.AgentMBean                                - java.lang.reflect.InvocationTargetException


My DataSourceConnection looks like this:
<DataSourceConnectionConfig
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="../org.eclipse.smila.connectivity.framework.crawler.filesystem/schemas/FileSystemDataSourceConnectionConfigSchema.xsd"
>
  <DataSourceID>drools_xmldump</DataSourceID>
  <SchemaID>org.eclipse.smila.connectivity.framework.crawler.filesystem</SchemaID>
  <DataConnectionID>
    <Crawler>FileSystemCrawler</Crawler>
  </DataConnectionID>
  <DeltaIndexing>full</DeltaIndexing> 
  <Attributes>
    <Attribute Type="Date" Name="LastModifiedDate" HashAttribute="true">
      <FileAttributes>LastModifiedDate</FileAttributes>
    </Attribute>
    <Attribute Type="String" Name="Path" KeyAttribute="true">
      <FileAttributes>Path</FileAttributes>
    </Attribute>
    <Attribute Type="String" Name="Extension">
      <FileAttributes>FileExtension</FileAttributes>
    </Attribute>
  </Attributes>
  <Process>
    <BaseDir>../../</BaseDir>
    <Filter Recursive="true" CaseSensitive="false">
      <Include Name="oneRecipeTest.xml"/>
    </Filter>
  </Process>
</DataSourceConnectionConfig>



Am 30.12.10, "Oliver Schäfer" <schae003@xxxxxxxxxxxxxxxxx> hat geschrieben:

Hello,
I have a second question because I am getting a crazy error. I'm always get a "PermGen space" exception when I start SMILA from Eclipse and then crawl AND search some records. I don't get this exception when I just crawl or just search. Only when I perform both (in one Run) the exception is thrown.
Here some examples:
Run1 (no Exception):
smila crawl datasourceX
smila crawl datasourceX
...
Run2 (no Exception):
do a search
do a search
...
Run3 (Exception):
do a search
smila crawl datasourceX
Run4 (Exception):
smila crawl datasourceX
do a search

When the exception is thrown after a crawl (Run3), this crawl is stopped and when I terminate the Run and start a new one --> the Crawl is performed while starting SMILA. After testing the scenarios above, I saw that when I consecutively do 5-10 crawls I'm getting the Exception too. Is this normal?
The config.ini from my Eclipse (Galileo) is this:
-vm
C:/Program Files (x86)/Java/jdk1.6.0_20/bin
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.platform
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40M
-Xmx512M
-XX:PermSize=64M
-XX:MaxPermSize=256M

Kind regards,

Oliver Schäfer

Here are some outputs from the console:
The full log of one a run (1 crawl + 1 aborted search) is in the attachment.

Exception while searching (from the console):

FEHLER: 'Could not initialize class com.sun.org.apache.bcel.internal.generic.InstructionConstants'
SCHWER WIEGENDER FEHLER: 'Die Formatvorlage konnte nicht kompiliert werden.'
30.12.2010 18:04:45 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet search threw exception
javax.xml.transform.TransformerConfigurationException: Die Formatvorlage konnte nicht kompiliert werden.
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:828)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:617)
at org.eclipse.smila.search.servlet.SMILASearchServlet.getXSLTransformer(SMILASearchServlet.java:267)
at org.eclipse.smila.search.servlet.SMILASearchServlet.transform(SMILASearchServlet.java:237)
at org.eclipse.smila.search.servlet.SMILASearchServlet.processRequest(SMILASearchServlet.java:203)
at org.eclipse.smila.search.servlet.SMILASearchServlet.doPost(SMILASearchServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)

Exception while crawling (excerpt from the console):

smila crawlerTasksState
[INFO ] Crawl States... {drools_xmldump=Finished}.

osgi> smila crawl drools_xmldump
[INFO ] Starting crawl [drools_xmldump]... Crawler with the dataSourceId = drools_xmldump and hashcode [32252762] successfully started!.

osgi> smila crawl drools_xmldump
[INFO ] Starting crawl [drools_xmldump]... Crawler with the dataSourceId = drools_xmldump and hashcode [1460902] successfully started!.

osgi> smila crawl drools_xmldump
[ERROR] error executing smila osgi command
org.eclipse.smila.management.jmx.client.exceptions.ConfigurationLoadException: Unable to load configuration
at org.eclipse.smila.management.jmx.client.osgi.OSGiConfigLoader.load(OSGiConfigLoader.java:64)
at org.eclipse.smila.management.jmx.client.osgi.SMILACommandProvider._smila(SMILACommandProvider.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:303)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:288)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:224)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.OutOfMemoryError: PermGen space
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)
at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:76)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:30)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.xml.internal.bind.v2.ClassFactory.create0(ClassFactory.java:112)
at com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.createInstance(ClassBeanInfoImpl.java:250)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.createInstance(UnmarshallingContext.java:592)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:170)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:470)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:448)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:79)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:137)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:200)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:173)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
org.eclipse.smila.management.jmx.client.exceptions.ConfigurationLoadException: Unable to load configuration

qtl {
position: absolute;
border: 1px solid #cccccc;
-moz-border-radius: 5px;
opacity: 0.2;
line-height: 100%;
z-index: 999;
direction: ltr;
}

qtl:hover,qtl.open {
opacity: 1;
}

qtl,qtlbar {
height: 22px;
}

qtlbar {
display: block;
width: 100%;
background-color: #cccccc;
cursor: move;
}

qtlbar img {
border: 0;
padding: 3px;
height: 16px;
width: 16px;
cursor: pointer;
}

qtlbar img:hover {
background-color: #aaaaff;
}

qtl>iframe {
border: 0;
height: 0;
width: 0;
}

qtl.open {
height: auto;
}

qtl.open>iframe {
height: 200px;
width: 300px;
}






_______________________________________________
smila-user mailing list
smila-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/smila-user


Back to the top