Re: stress testing tomcat applications

2014-09-12 Thread Konstantin Kolinko
2014-09-11 17:07 GMT+04:00 Elias Kopsiaftis yemi...@gmail.com:
 ok Thanks,

 I am using Tomcat7. I dont know much about Tomcat application development,
 so I will research these options you gave me before responding again.

 Thanks again


As written here:
http://tomcat.apache.org/lists.html#tomcat-users

Important:
1. When asking questions on the list, please state your exact Tomcat
version (which is three numbers, 7.0.x or 6.0.x), your operating
system, and essential bits of your configuration.
(...)
6. When replying, please write your text below the quoted one.

Sessionid is usually changed when authentication succeeds. For FORM
authentication and up-to-date Tomcat 7 the change happens twice (once
login form is displayed and once authentication succeeds). At that
time the old sessionid becomes invalid.

The session may also expire or be explicitly invalidated (e.g. during logout).

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



Re: stress testing tomcat applications

2014-09-12 Thread Elias Kopsiaftis
Konstantin,

I apologize for my lack of information, but for an inexperienced user this
can be difficult, Tomcat version and OS are easy enough, but configuration
bits can be difficult, especially since a configuration can exist that is
causing your problem, that you dont even know it exists.

Anyways,
I believe my stress tester is working fine. I think the real problem I
faced was since multiple threads are sharing the same resource(System.out),
they are not all getting to print to it and some essages are getting lost.
Also, I am not using an authenticator, or even a web page, I wrote a java
application to connect to the tomcat server. As for the original problem,
sessions were not getting lost, it was a concurrency issue within my stress
tester.

Thank you all for your responses

On Fri, Sep 12, 2014 at 10:15 AM, Konstantin Kolinko knst.koli...@gmail.com
 wrote:

 2014-09-11 17:07 GMT+04:00 Elias Kopsiaftis yemi...@gmail.com:
  ok Thanks,
 
  I am using Tomcat7. I dont know much about Tomcat application
 development,
  so I will research these options you gave me before responding again.
 
  Thanks again


 As written here:
 http://tomcat.apache.org/lists.html#tomcat-users

 Important:
 1. When asking questions on the list, please state your exact Tomcat
 version (which is three numbers, 7.0.x or 6.0.x), your operating
 system, and essential bits of your configuration.
 (...)
 6. When replying, please write your text below the quoted one.

 Sessionid is usually changed when authentication succeeds. For FORM
 authentication and up-to-date Tomcat 7 the change happens twice (once
 login form is displayed and once authentication succeeds). At that
 time the old sessionid becomes invalid.

 The session may also expire or be explicitly invalidated (e.g. during
 logout).

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




Re: stress testing tomcat applications

2014-09-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Elias,

On 9/12/14 10:24 AM, Elias Kopsiaftis wrote:
 I apologize for my lack of information, but for an inexperienced
 user this can be difficult, Tomcat version and OS are easy enough,
 but configuration bits can be difficult, especially since a
 configuration can exist that is causing your problem, that you dont
 even know it exists.
 
 Anyways, I believe my stress tester is working fine. I think the
 real problem I faced was since multiple threads are sharing the
 same resource(System.out), they are not all getting to print to it
 and some essages are getting lost.

Unlikely: these streams are threadsafe, so you shouldn't be losing
anything. You may have un-flushed data, though, but that should all be
flushed if the process exits.

 Also, I am not using an authenticator, or even a web page, I wrote
 a java application to connect to the tomcat server. As for the
 original problem, sessions were not getting lost, it was a
 concurrency issue within my stress tester.

Sounds likely.

You may want to consider using JMeter. It's already got pretty much
everything you need, and it works properly.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUEwl0AAoJEBzwKT+lPKRYzeQQALIpa26Cc1/6QWUtDf3fQiVQ
h/+yR0qn2zwoG9PhEQP2aGuwJ7E+6CYEuOphpH4Almkrvm4VIjcPNgLYQjLF8iD4
eXFI87REuUsjTchW+eHl80dMPzppIwCXXtbG+A82mxM/Fz8DVFs/ZC/2uXi1Akri
sqkS4x9VAuU2gJOpS8tlgEJq/+1o+zPrRVVqYiNdrH4I1QBz2wKu9UIssro3idcd
lEpptUydIXINgl4dmSloINA37l3XZcuwWuQ6RF29P3BewYoioyiP1/5UyHZnaGg5
Dm2at7fmKG9XNFsDbLY5FVTpklEw8G1E2iOMzwNUoEja/Km/zpPJ+2vGbp0v27X1
yfUUCoeqLftYKzZ+/XuTlmQ1sBEkM6JqIZqgZ+FSC3DnEyJJp9wEJnPjiHltIPEw
IhaZmh84DXGzez4Icikr1neoPpXNfOcJucVPXTUmoA++Ceg4TB3QOPJYqbhowVVM
Xe7vfT22gXu0sD8ZzPJY2ayzCaFVDY1bA7DGrQNQQ7GStPk7lc3If56q+ilQUyQv
vC96/uDAQDdIS2zFZNlou9gNJ1wJ6bNOOpHVFN0mnEvXeoa3ZwrekdIkrhRQtLFm
BSybbo9LH5Q1VTb7piDxZ/gw60LnPTb+uVyGGWeuefnPfU13SPA7rC1ppzf6Byvg
IWIac1nuUTXI8B5p08tC
=zaZe
-END PGP SIGNATURE-

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



Re: stress testing tomcat applications

2014-09-12 Thread Elias Kopsiaftis
Thanks! I will look into JMEter

On Fri, Sep 12, 2014 at 10:55 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Elias,

 On 9/12/14 10:24 AM, Elias Kopsiaftis wrote:
  I apologize for my lack of information, but for an inexperienced
  user this can be difficult, Tomcat version and OS are easy enough,
  but configuration bits can be difficult, especially since a
  configuration can exist that is causing your problem, that you dont
  even know it exists.
 
  Anyways, I believe my stress tester is working fine. I think the
  real problem I faced was since multiple threads are sharing the
  same resource(System.out), they are not all getting to print to it
  and some essages are getting lost.

 Unlikely: these streams are threadsafe, so you shouldn't be losing
 anything. You may have un-flushed data, though, but that should all be
 flushed if the process exits.

  Also, I am not using an authenticator, or even a web page, I wrote
  a java application to connect to the tomcat server. As for the
  original problem, sessions were not getting lost, it was a
  concurrency issue within my stress tester.

 Sounds likely.

 You may want to consider using JMeter. It's already got pretty much
 everything you need, and it works properly.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1
 Comment: GPGTools - http://gpgtools.org

 iQIcBAEBCAAGBQJUEwl0AAoJEBzwKT+lPKRYzeQQALIpa26Cc1/6QWUtDf3fQiVQ
 h/+yR0qn2zwoG9PhEQP2aGuwJ7E+6CYEuOphpH4Almkrvm4VIjcPNgLYQjLF8iD4
 eXFI87REuUsjTchW+eHl80dMPzppIwCXXtbG+A82mxM/Fz8DVFs/ZC/2uXi1Akri
 sqkS4x9VAuU2gJOpS8tlgEJq/+1o+zPrRVVqYiNdrH4I1QBz2wKu9UIssro3idcd
 lEpptUydIXINgl4dmSloINA37l3XZcuwWuQ6RF29P3BewYoioyiP1/5UyHZnaGg5
 Dm2at7fmKG9XNFsDbLY5FVTpklEw8G1E2iOMzwNUoEja/Km/zpPJ+2vGbp0v27X1
 yfUUCoeqLftYKzZ+/XuTlmQ1sBEkM6JqIZqgZ+FSC3DnEyJJp9wEJnPjiHltIPEw
 IhaZmh84DXGzez4Icikr1neoPpXNfOcJucVPXTUmoA++Ceg4TB3QOPJYqbhowVVM
 Xe7vfT22gXu0sD8ZzPJY2ayzCaFVDY1bA7DGrQNQQ7GStPk7lc3If56q+ilQUyQv
 vC96/uDAQDdIS2zFZNlou9gNJ1wJ6bNOOpHVFN0mnEvXeoa3ZwrekdIkrhRQtLFm
 BSybbo9LH5Q1VTb7piDxZ/gw60LnPTb+uVyGGWeuefnPfU13SPA7rC1ppzf6Byvg
 IWIac1nuUTXI8B5p08tC
 =zaZe
 -END PGP SIGNATURE-

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




Re: stress testing tomcat applications

2014-09-11 Thread Ognjen Blagojevic

Elias,

On 11.9.2014 2:03, Elias Kopsiaftis wrote:

My best guess is that tomcat doesnt like to accept requests coming for two
different logins from the same IP and same program. Is that accurate? Is
anything else that could be going wrong here?


Tomcat should allow multiple sessions from same IP without problems.

Please state which exact version of Tomcat do you use. There are plenty 
of them.


What is the number of active sessions when you start experiencing errors?

Do you have Manager element in your context.xml or server.xml defined? 
Does that element have maxActiveSessions attribute?


I recommend to implement HttpSessionListener in your application and log 
session creation and destruction to understand at which point in time 
the sessions are destroyed.


-Ognjen


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



Re: stress testing tomcat applications

2014-09-11 Thread Elias Kopsiaftis
ok Thanks,

I am using Tomcat7. I dont know much about Tomcat application development,
so I will research these options you gave me before responding again.

Thanks again

On Thu, Sep 11, 2014 at 4:07 AM, Ognjen Blagojevic 
ognjen.d.blagoje...@gmail.com wrote:

 Elias,

 On 11.9.2014 2:03, Elias Kopsiaftis wrote:

 My best guess is that tomcat doesnt like to accept requests coming for two
 different logins from the same IP and same program. Is that accurate? Is
 anything else that could be going wrong here?


 Tomcat should allow multiple sessions from same IP without problems.

 Please state which exact version of Tomcat do you use. There are plenty of
 them.

 What is the number of active sessions when you start experiencing errors?

 Do you have Manager element in your context.xml or server.xml defined?
 Does that element have maxActiveSessions attribute?

 I recommend to implement HttpSessionListener in your application and log
 session creation and destruction to understand at which point in time the
 sessions are destroyed.

 -Ognjen


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




Re: stress testing tomcat applications

2014-09-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Elias,

On 9/10/14 8:03 PM, Elias Kopsiaftis wrote:
 I am working on a stress tester for my application, however, from
 within the stress tester, sometimes it loses the sessionid

Are you writing your own stress-testing software, or using a tool such
as JMeter, etc.?

Perhaps your tool is loosing the session identifier.

 An overview of the process is
 
 1. login to application and get sessionid 2. send subsequent
 requests to server that sessionid 3. Repeat steps 1 and 2 for
 multiple users
 
 The problem is that in my server logs, I occasionally get a message
 saying a client connected with an unrecognized sessionid, ie one
 that has no logged in yet
 
 My best guess is that tomcat doesnt like to accept requests coming
 for two different logins from the same IP and same program. Is that
 accurate? Is anything else that could be going wrong here?

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUEiE/AAoJEBzwKT+lPKRY7UAP/3GkbtpAisXGeg02ATE2kJmi
E38g+IEwkSFMGIDPRsYk14GDYByK8l+Cpz8GrTpqFyRCCWZL58+qfQGXW5azqwZa
pvYyI1pSXqxjpjw7vqcL6atTpsro2e5Fq6Cc9LvPoXtBGH0X6BjgG0duPKS5w9NX
tk5V3mTgizLMQnyfmueAkmxuOgnoqPqAgKKLBeZkTYAHZ96gIz4+U50P/8DANteA
YW7MjtOuTFvav7gSER8FfbVvb46z4Irl19Cz3yOVfztIkuzTOrl1S4E56OaC6xXZ
IZAxgM7gSSDxgqiyTImcpMNyHNc3Czh0XpIKbY8WzXmEnte3RWzEeYUKL48ZhXRE
ZpeCMA9kzAQhb/l6DxrohoG6/bUjv8QsUuCX+OeC81AKy9N0KMGnTvX3yDgDBk3F
p+d1VDQp8G7dDP0IZwXVtcDvgSFU2kPdVM6OuA/myOgE7G9i7k51Kx4SUjZrC0nv
mozv2o/QsxdlIz2DZrzh5lYtfkeA4aQHi39MnMihxdiDSlOjZPCklGk4LbKOVkRE
UBdVVCJlrFtTKh+wLUOLSdsNWFIVlKYMp4rmQdwaFwdDjG/ABAsyxZ/0eteMT9n0
O7LtdP9XtFEWVbNZBddzHD8YhkVsDW59S1+FeQvjjODuh7CtE1xZbxUgtaLay4NA
nSHI59k6ew4t94SaZQ5t
=bxa4
-END PGP SIGNATURE-

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



stress testing tomcat applications

2014-09-10 Thread Elias Kopsiaftis
Hi,

I am working on a stress tester for my application, however, from within
the stress tester, sometimes it loses the sessionid

An overview of the process is

1. login to application and get sessionid
2. send subsequent requests to server that sessionid
3. Repeat steps 1 and 2 for multiple users

The problem is that in my server logs, I occasionally get a message saying
a client connected with an unrecognized sessionid, ie one that has no
logged in yet

My best guess is that tomcat doesnt like to accept requests coming for two
different logins from the same IP and same program. Is that accurate? Is
anything else that could be going wrong here?