Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My web server container is Tomcat 6.0.14

JVM 1.6.0_17-b04

BlazeDS 3.2.0.3978

Im sending request from the same local machine via AMF to BlazeDS server and only first request takes about 10secend to proceed. Each next request is preceeding correctly (very fast, less than 0.5s). Anyone know what's the reason of soo slow responsing?

I'm a developer, not administrator so please be patient :)

share|improve this question

3 Answers 3

Class loading and user state creation are the two most obvious likely causes.

share|improve this answer

Yes, general loading of classes is most likely the culprit. Do you have the messagebroker servlet set to load on startup in the web.xml? If not, that might help get a bunch of stuff loaded when the server starts up before the first request comes in.

share|improve this answer
    
@Marplesoft have you got mabey any idea how to hoke up MessageBrokerServler to server web.xml? –  beynar Jan 5 '10 at 9:04

In server web.xml file i've got only 2 servlets registred default (org.apache.catalina.servlets.DefaultServlet) and jsp (org.apache.jasper.servlet.JspServlet)

Web.xml file of my application:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>Kums</display-name>

    <context-param>
        <param-name>flex.class.path</param-name>
        <param-value>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars</param-value>
    </context-param>

    <listener>
        <listener-class>flex.messaging.HttpFlexSession</listener-class>
    </listener>

    <servlet>
        <servlet-name>MessageBrokerServlet</servlet-name>
        <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
        <init-param>
            <param-name>services.configuration.file</param-name>
            <param-value>/WEB-INF/flex/services-config.xml</param-value>
        </init-param>
        <init-param>
            <param-name>flex.write.path</param-name>
            <param-value>/WEB-INF/flex</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>MessageBrokerServlet</servlet-name>
        <url-pattern>/messagebroker/*</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>

</web-app>

When I copy servlet and servlet mapping definition of MessageBrookerServlet from application web.xml to server web.xml, tomcat throws exceptions ClassNotFoundException while startup. Here I upload entire tomcat startup debug output.

Thanks

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.