Re: Fwd: websocket connections consume too much memory

2019-02-25 Thread Maxim Solodovnik
Hello All,

Maybe this behavior is caused by the fact defaultMaxSessionIdleTimeout
is not set for websockets?

Can be updated as follows

final WsServerContainer sc =
(WsServerContainer)getServletContext().getAttribute(SERVER_CONTAINER_SERVLET_CONTEXT_ATTRIBUTE);
if (sc != null) {
 sc.setDefaultMaxSessionIdleTimeout(60 * 1000L);
}

On Mon, 25 Feb 2019 at 22:04, Иналь Кятов  wrote:
>
> I retest with
>
>
> *8.5.38*
>
> ...
>
> 
> org.apache.tomcat.embed
> tomcat-embed-websocket
> ${tomcat-embedded.version}
> 
> 
> org.apache.tomcat.embed
> tomcat-embed-core
> ${tomcat-embedded.version}
> 
> 
> org.apache.tomcat.embed
> tomcat-embed-el
> ${tomcat-embedded.version}
> 
> 
> org.apache.tomcat
> tomcat-annotations-api
> ${tomcat-embedded.version}
> 
>
>
> The result is the same
>
> I also checked status of the sockets on server with the netstat command.
>
> The number of ESTABLISHED is constantly and rapidly growing.
>
> Note, the problem is reproduced as a result of load testing.
>
>
> ср, 20 февр. 2019 г. в 01:40, Christopher Schultz <
> ch...@christopherschultz.net>:
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> >
> > Иналь,
> >
> > On 2/19/19 12:12, Иналь Кятов wrote:
> > > I encountered a problem with embedded tomcat 8.5.29 (part of spring
> > > boot 1.5).
> >
> > Can you retest with the current version of 8.5.x? Current version is
> > 8.5.38, released 2019-02-11.
> >
> > - -chris
> > -BEGIN PGP SIGNATURE-
> > Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
> >
> > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxshcsACgkQHPApP6U8
> > pFgaVg//TF4/DVpFjtTLk+d6Z/AOcFX7SEYg/0SEKjpKtxaUr5+19umt5mMi+Zqk
> > UkkCSB19KRpqLUY8o53xlgqL9SqqBF14Wh0T2FYqpXtKSfV/Nv6tvsEV6Bd9LqTz
> > /RSFcAmCTL+SDIwXQ4FzmW55aaPfous9lKgPYdZlYy4UwVvG7PP/EOD7swR470eU
> > DmvjkkOKPJ87mSFra3LJ5MxrvLAw+9PgEACLc4nF6Tkceisn7kTIP/s7SGKb4Few
> > PWXYKy7NfcBASMYfikS/SAdCHNbjD9Za+L6okTuUjjvlNwAQvM7BWnG2CurpX8wQ
> > oEinp/4OsXaD0yZ/pi+dmUOUS/AwSuaxD4YZWembSEvTW658bc+5YgpfcOLivcO+
> > iB4/erdLHW8dLW07Nl2EafTXvKTOXHNlL4HIrTLzoi8SlJ2b+j4U3/9b5LBke2TG
> > HpQSo7MxqVfllhDTiwsYMRIkPupZEqR41x8wG4CpcfpQjXJMmAvaeFpBQA0ZnVyn
> > OkbYDi3IF9C8uAd0sbEx2npZ05ptb8zyHmU0mTawBDSL/e+3xbcFvZ2v0LNujgVB
> > VqJdtXOJKRA66l6dN+nS377guMeL5BQJS4PeRMIapWotJbuCE2nYgcjcie3ipClq
> > SP00v4Vd85g4D5XPAWewoWJXRiOPMp1dc5pTYwviTgG6FNGtoCE=
> > =wHth
> > -END PGP SIGNATURE-
> >



-- 
WBR
Maxim aka solomax

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Fwd: websocket connections consume too much memory

2019-02-25 Thread Иналь Кятов
I retest with


*8.5.38*

...


org.apache.tomcat.embed
tomcat-embed-websocket
${tomcat-embedded.version}


org.apache.tomcat.embed
tomcat-embed-core
${tomcat-embedded.version}


org.apache.tomcat.embed
tomcat-embed-el
${tomcat-embedded.version}


org.apache.tomcat
tomcat-annotations-api
${tomcat-embedded.version}



The result is the same

I also checked status of the sockets on server with the netstat command.

The number of ESTABLISHED is constantly and rapidly growing.

Note, the problem is reproduced as a result of load testing.


ср, 20 февр. 2019 г. в 01:40, Christopher Schultz <
ch...@christopherschultz.net>:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Иналь,
>
> On 2/19/19 12:12, Иналь Кятов wrote:
> > I encountered a problem with embedded tomcat 8.5.29 (part of spring
> > boot 1.5).
>
> Can you retest with the current version of 8.5.x? Current version is
> 8.5.38, released 2019-02-11.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxshcsACgkQHPApP6U8
> pFgaVg//TF4/DVpFjtTLk+d6Z/AOcFX7SEYg/0SEKjpKtxaUr5+19umt5mMi+Zqk
> UkkCSB19KRpqLUY8o53xlgqL9SqqBF14Wh0T2FYqpXtKSfV/Nv6tvsEV6Bd9LqTz
> /RSFcAmCTL+SDIwXQ4FzmW55aaPfous9lKgPYdZlYy4UwVvG7PP/EOD7swR470eU
> DmvjkkOKPJ87mSFra3LJ5MxrvLAw+9PgEACLc4nF6Tkceisn7kTIP/s7SGKb4Few
> PWXYKy7NfcBASMYfikS/SAdCHNbjD9Za+L6okTuUjjvlNwAQvM7BWnG2CurpX8wQ
> oEinp/4OsXaD0yZ/pi+dmUOUS/AwSuaxD4YZWembSEvTW658bc+5YgpfcOLivcO+
> iB4/erdLHW8dLW07Nl2EafTXvKTOXHNlL4HIrTLzoi8SlJ2b+j4U3/9b5LBke2TG
> HpQSo7MxqVfllhDTiwsYMRIkPupZEqR41x8wG4CpcfpQjXJMmAvaeFpBQA0ZnVyn
> OkbYDi3IF9C8uAd0sbEx2npZ05ptb8zyHmU0mTawBDSL/e+3xbcFvZ2v0LNujgVB
> VqJdtXOJKRA66l6dN+nS377guMeL5BQJS4PeRMIapWotJbuCE2nYgcjcie3ipClq
> SP00v4Vd85g4D5XPAWewoWJXRiOPMp1dc5pTYwviTgG6FNGtoCE=
> =wHth
> -END PGP SIGNATURE-
>


Re: Parallel Tomcat Instances On Same Server

2019-02-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jerry,

On 2/23/19 10:52, Jerry Malcolm wrote:
> Good point.  This is a tactical solution only.  Ultimately moving
> to AWS.  But for now, I'm not as worried about actual failures as I
> am about the need to continue to do dev and test with new clients
> (i.e. bouncing TC) while still keeping production server
> untouched.
> 
> On 2/22/2019 12:03 PM, Hassan Schroeder wrote:
>> On Thu, Feb 21, 2019 at 10:26 PM Jerry Malcolm 
>>  wrote:
>>> I need a bit of brainstorming.  I have a production Tomcat
>>> server that hosts several web sites.  A couple of these
>>> websites are high-availability sensitive.
>> So why are you running on a single-box architecture? Seems like 
>> the first thing you'd want to address is that single point of
>> failure...

There really is not much thinking to be done, here.

Do whatever you would with a pair of separated dev/prod environments,
except you just put the dev one into prod as well. You are already
using CATALINA_HOME/CATALINA_BASE split, right?

So just have two separate services, one for prod and one for dev. The
only difference is the on-dick configuration file(s) and the port number
s.

This is only a small deviation from a plain-old out-of-the-tarball
configuration.

Don't overthink it.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxz9qAACgkQHPApP6U8
pFhAQA//RR4LurmFWZTid4m80kGjWo2LDJol9NzUSTqTagISyaSp8ByrgXsRn0kD
oBraGPnND7nr73HqgW2HM9EAFB+3NPRf9zXtekBwhN0276u1CB1vEiJtWmdKvIdy
2U194nffexbhuWbNDIznJfF4w+GolIV677asaFXjNFGkPH+gHUOlbFYaL2qJC304
8Eu33Bhua1/eHRIHD8xfxYbzz5tMIi9Lvgwh5yTaFw7soyXlBi81dHNssPDW3hLN
OAAkynSH/cOVYrc7Z3s9oI2HaLBgflPLd/AlxjSNYZm7FYDHLPfsYeNW5ZIn66uu
Nzy6s86Y7QdltCqN1mII3Ym0yFsJEdD5QqxlgXDILmzvIWiy3rOtKHKLhuwMefD+
vApSDrx5XgOheG1qqr+EuBTMAB/prlGK+aPAsIYxOY2XjNzQVRwk7OcVVh7T51xN
KN2Qr1pOrpDluLVvJ/NogZZJIbgbKAzNLnWqCQ0WpBpRST9pIuFyXTu4mZZu+aYI
rH8DUUVxkBiVjBH5chLezElt4jEbf7A6IQFFzaWszy3/J35JcXVdTVEjpmtkt4dA
JKF1R8SfrJCbzUivOM3N5WCO4A6OhzO9QYjCf1DQR+AOCamaLtp+l7550CPSSXpj
lYeYNTsC5XVk4hJJ+xF4uKWAxZW04LpsbeuK40nLVc5Q5MDcq0s=
=SXzc
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org