Announcement Announcement Module
No announcement yet.
Serious performances issues Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Serious performances issues


    I have an Spring application running in 7 different instances, all instances running in the same (AIX) server.

    These 7 instances are running dramatically slow, I wonder if there is a descrition of the minimum amount of memory needed by the JVM in order to launch Spring.

    Also, if by chance there's a troubleshooting guide in order to detect these performanmce issues please let me know.

    Thanks a lot.

  • #2
    I do not know about exact numbers, but Spring itself should not occupy that much memory. However, if your configuration contains large number of beans and/ or beans with big memory footprint then you will encounter problems. But that is then a responsibility of your application itself.

    I recommend using a memory profiler to find out more details about where the observed memory consumption actually comes from.



    • #3
      This is a funny fact:

      -In DEV the applications works properly, with good speed.

      -In STAGE, the JVM takes 80% of the CPU.

      Any suggestion is welcome. Thanks.


      • #4
        Now we see wher the problem is, it is an XML validation method with Xerces2:

        private boolean validateXmlVsSchema(String SchemaUrl, String xmlString) throws ValidationException, SAXParseException, UnhandleableException {

        File schema = new File(SchemaUrl);
        log.debug("The schema is being searched at: " + SchemaUrl);
        if ( !schema.exists() ) {
        throw new UnhandleableException(ValidatorConstants.SCHEMA_NO T_FOUND_EXCEPTION,
        new Exception(ValidatorConstants.SCHEMA_NOT_FOUND_EXCE PTION));

        SAXParser parser = new SAXParser();
        parser.setFeature("", true);
        parser.setFeature("", true);
        parser.setFeature("", true);
        parser.setProperty("", SchemaUrl );
        Validator handler = new Validator();
        InputStream is = new ByteArrayInputStream( xmlString.getBytes("UTF-8"));
        parser.parse(new InputSource(is));
        log.error(clazzName + "-> " + ValidatorConstants.SCHEMA_VALIDATION_ERROR + ": " + handler.validationError +
        "" + handler.saxParseException.getMessage(), handler.saxParseException);
        throw handler.saxParseException;
        } else {
        log.debug(clazzName + "-> " + ValidatorConstants.DOCUMENT_VALIDATED );
        return true;
        } catch( utfex){ + "-> Wrong utf: " + utfex.getMessage(), utfex );
        } catch( ioe){
        log.error(clazzName + "-> IOException " + ioe.getMessage(), ioe);
        throw new ValidationException(ValidatorConstants.SCHEMA_VALI DATION_EXCEPTION, ioe);
        } catch (SAXParseException e) {
        log.error(clazzName + "-> SAXParseException " + e.getMessage(), e);
        throw e;
        } catch (SAXNotRecognizedException e) {
        log.error(clazzName + "-> SAXNotRecognizedException " + e.getMessage(), e);
        throw new ValidationException(ValidatorConstants.SCHEMA_VALI DATION_EXCEPTION, e);
        } catch (SAXNotSupportedException e) {
        log.error(clazzName + "-> SAXNotSupportedException " + e.getMessage(), e);
        throw new ValidationException(ValidatorConstants.SCHEMA_VALI DATION_EXCEPTION, e);
        } catch (SAXException e) {
        log.error(clazzName + "-> SAXException " + e.getMessage(), e);
        throw new ValidationException(ValidatorConstants.SCHEMA_VALI DATION_EXCEPTION, e);
        return true;

        I have granted all permissions to the application in order to read the XML schema in the file system, but for some reason it slows down too much.

        Thanks for your help!


        • #5
          Indeed strange. I would use a profiler to check what is going on there.


          • #6
            If you could not determine the cause (by profiling) then at last resort you could try disabling the XML validation.