Unable to connect: I/O Error

Post here all your questions related with SmartFoxServer Java API

Moderators: Bax, Lapo, rjgtav

Unable to connect: I/O Error

Postby poso » 18 Nov 2009, 14:16

Hi,

I'm hitting the smartfox server using JMeter and a custom sampler that uses the Java API. The test scenario involves the following actions: connect, login, join room, move, logout and disconnect.
When I run this test with 500 virtual users I get 50% error on connect actions with the message "Unable to connect: I/O Error".
If I run with 200 virtual users I get no errors at all.

Is there a parameter configuration to set in order to be able to accept more connections from the server?

Thanks,
Pablo

PS: This is my Config.xml:

Code: Select all
<!--

    SmartFoxServer PRO
    (c) 2004-2007 gotoAndPlay()
    www.gotoandplay.it
    www.smartfoxserver.com

    Main Configuration file
    version 1.6.2

    NOTE:
    You can find detailed informations on how to configure the server by reading
    the tutorials in section 2 of the documentation.
    ( http://www.smartfoxserver.com/docs/docPages/config/basics.htm )

-->

<SmartFoxConfig>

    <ServerSetup>

        <ServerIP>*</ServerIP>
        <ServerPort>9339</ServerPort>
        <EnableNPC>true</EnableNPC>

        <AutoSendPolicyFile>true</AutoSendPolicyFile>
        <MaxUserIdleTime>300</MaxUserIdleTime>

        <!-- Server Variables limits (-1 = unlimited) -->
        <MaxRoomVars>-1</MaxRoomVars>
        <MaxUserVars>-1</MaxUserVars>

        <AntiFlood active="false">
            <MinMsgTime tolerance="5">1000</MinMsgTime>
            <MaxRepeatedMessages>3</MaxRepeatedMessages>
            <WarningsBeforeKick>2</WarningsBeforeKick>
            <WarningMessage><![CDATA[No flooding allowed!)]]></WarningMessage>
            <KickMessage><![CDATA[You've been warned! No flooding! Now you're kicked]]></KickMessage>
            <BanMessage><![CDATA[Stop Flooding!! You're being banned]]></BanMessage>
            <BanAfter timeSpan="1">3</BanAfter>
        </AntiFlood>

        <BadWordsFilter active="false">
            <FilterMode>filter</FilterMode> <!-- REMOVE or FILTER -->
            <StripCharacters><![CDATA[,.;:_!$%&/#*-+]]></StripCharacters>
            <Warnings>true</Warnings>
            <FilterRoomNames>true</FilterRoomNames>
            <FilterUserNames>true</FilterUserNames>
            <WarningsBeforeKick>3</WarningsBeforeKick>
            <WarningMessage><![CDATA[No swearing!)]]></WarningMessage>
            <KickMessage><![CDATA[You've been warned! No Swearing! Now you're kicked]]></KickMessage>
            <BanMessage><![CDATA[Stop Swearing! You're being banned!]]></BanMessage>
            <BanAfter timeSpan="1">3</BanAfter>

            <BadWordsList>
                <badWord>motherfucker</badWord>
                <badWord>dickhead</badWord>
                <badWord>asshole</badWord>
                <badWord>shithead</badWord>
                <badWord>shit</badWord>
                <badWord>fucked</badWord>
                <badWord>fucker</badWord>
                <badWord>fucking</badWord>
                <badWord>fuck</badWord>
                <badWord>dickhead</badWord>
                <badWord>bastard</badWord>
                <badWord>nigger</badWord>
                <badWord>idiot</badWord>
                <badWord>bitch</badWord>
            </BadWordsList>
        </BadWordsFilter>

        <BanCleaning>auto</BanCleaning>
        <BanDuration>1800</BanDuration> <!-- 30 min -->
        <BannedLoginMessage>You have been banned!</BannedLoginMessage>

        <OutQueueThreads>2</OutQueueThreads>
        <ExtHandlerThreads>1</ExtHandlerThreads>
        <MaxWriterQueue>50</MaxWriterQueue>

        <!--
            New since 1.6.0
            Set the client queue size and the max. allowed dropped packets
        -->
        <ClientMessagQueue>
            <QueueSize>80</QueueSize>
            <MaxAllowedDroppedPackets>10</MaxAllowedDroppedPackets>
        </ClientMessagQueue>

        <MaxIncomingQueue>5000</MaxIncomingQueue>
        <DeadChannelsPolicy>strict</DeadChannelsPolicy>
        <MaxMsgLen>20480</MaxMsgLen>

        <LogMaxSize>5000000</LogMaxSize>
        <LogMaxFiles>5</LogMaxFiles>

        <!--
            Available options are:

            FINEST
            FINER
            FINE
            CONFIG
            INFO
            WARNING
            SEVERE

        -->
        <FileLoggingLevel>FINEST</FileLoggingLevel>
        <ConsoleLoggingLevel>INFO</ConsoleLoggingLevel>

        <!-- Adminisitrator login -->
        <AdminLogin>sfs_admin</AdminLogin>
        <AdminPassword>sfs_pass</AdminPassword>

        <!-- Allowed administrator IP addresses -->
        <AdminAllowedAddresses>
            <AllowedAddress>*.*.*.*</AllowedAddress>
        </AdminAllowedAddresses>

        <!-- Allow remote debugging of extensions -->
        <ExtensionRemoteDebug>true</ExtensionRemoteDebug>

        <!--
            Allow global autoreload of extensions upon file save
            You should specify in each Zone if the autoreload is enabled.
        -->
        <AutoReloadExtensions>true</AutoReloadExtensions>

        <ExtensionRemoteDebug>true</ExtensionRemoteDebug>

        <IpFilter>0</IpFilter>

        <Mailer>
            <MailHost>test.mail.com</MailHost>
            <MailUser>foo</MailUser>
            <MailPass>bar</MailPass>
            <SmtpPort>25</SmtpPort>
            <WorkerThreads>1</WorkerThreads>
        </Mailer>

        <!-- Enable / Disable remote zone info -->
        <EnableZoneInfo>false</EnableZoneInfo>

        <!--  raw custom protocol separator -->
        <RawProtocolSeparator><![CDATA[%]]></RawProtocolSeparator>

    </ServerSetup>

<!--
        Zones Configuration.
    -->
    <Zones>
        <Zone name="RealmManagerZone" uCountUpdate="true" buddyList="10" maxUsers="10" customLogin="false">
            <Rooms/>
         <Extensions>
                <extension name="RealmManagerExtension" className="com.trilogy.extension.config.RealmManagerExtension" type="java"/>
            </Extensions>
            <Moderators status="on">
                <Mod name="modName" pwd="modPass" />
            </Moderators>
        </Zone>

    </Zones>
   
   <WebServiceConfig userId="2" password="smartfox" url="http://localhost:8080/webservices-1.0-SNAPSHOT"/>
   <ServerInstance nameId="localhost"/>
   <Extensions>
       .......
    </Extensions>

</SmartFoxConfig>
poso
 
Posts: 3
Joined: 18 Nov 2009, 13:56

Postby Lapo » 18 Nov 2009, 20:43

It is likely that you are running out of file descriptors if you are using Linux/Unix. You will need to configure your system to allow many more files/sockets to handle a stress test.

All the details are found here:
http://www.smartfoxserver.com/docs/docP ... /linux.htm
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
 
Posts: 15305
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby poso » 19 Nov 2009, 21:05

Thanks Lapo! The test is running ok now.
poso
 
Posts: 3
Joined: 18 Nov 2009, 13:56


Return to Java2SE / Android Client API

Who is online

Users browsing this forum: No registered users and 1 guest