You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Karsten Gaul <ka...@exedio.com> on 2010/07/22 12:18:04 UTC

DB crash

Hi,

I'm trying to figure out, why my oracle db occasionally crashes when i 
load test my website using jmeter. yes, i do have some flexible queries 
that are quite long. The funny thing is, as mentioned, that the db does 
not crash every time i run the same test. My admin told me the machine 
crashed due to excessive memory consumption.
My test plan has four thread groups with a different number of threads 
and different ramp-up times whereof the longest is 5 mins. The overall 
amount of threads is 790. It's kinda weird that, when the db does not 
crash during the test, it hardly complains about anything. Neither is 
there too much load nor are there too many sessions.

the db server has 4 gb of ram if that's of any use.

I hoped to get to the limits of the webapp but the db seems to be the 
problem instead.

Any ideas?

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: DB crash

Posted by Karsten Gaul <ka...@exedio.com>.
Hi sebb,

> As your test plan is calling the database via the web application, in
> theory enough users of the application can cause the same problem.
>
> You have proved that the web application can bring down the database
> (which is useful to know).
>
> Whether it is possible for this to occur when not using JMeter depends
> on how close the test plan load is to what the application is intended
> to support.
>
> Use application logs to gather stats on the page requests made by
> actual users, and compare those with the load generated by JMeter.
> Adjust the JMeter test plan as necessary to reflect the target load.
>
> You also need to look at the web application to see if some of the SQL
> can be changed to reduce the database load.

Actually, what I did was taking REAL data from the logs in order to 
replay these with jmeter. That works fine as long as you edit this data 
a little (passwords etc.). The test plan is thus as close as I might 
possibly get to a real user's actions. Four csv files for four different 
options to get from a log in to the check out. These four ways are then 
executed by the threads in parallel.
However, what I do not know is how the actual live system reacts because 
I can only test on a less performant development system. Hopefully, the 
live system is better configured.

rgds
Karsten

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: DB crash

Posted by sebb <se...@gmail.com>.
On 22 July 2010 13:11, Karsten Gaul <ka...@exedio.com> wrote:
>
>> I don't know how to administer Oracle dbs
>
> me neither...

But presumably the db admins should be able to sort this out?

>> Surely there must be ways to configure the DB so that it remains
>> active even under heavy load?
>>
>> Or at least it should degrade gracefully.
>
> That's what I hoped for. Maybe the responses take some more time because the
> db blocks incoming requests until it's finished but it seems to consume all
> the memory until it recognizes that this wasn't the best idea.
> Unfortunately, at this point it's already too late.

That sounds like a configuration problem.
For example too many connections allowed for the memory available.

> Thanks anyway. I had hope that it was my fault because my test plan is badly
> configured.

As your test plan is calling the database via the web application, in
theory enough users of the application can cause the same problem.

You have proved that the web application can bring down the database
(which is useful to know).

Whether it is possible for this to occur when not using JMeter depends
on how close the test plan load is to what the application is intended
to support.

Use application logs to gather stats on the page requests made by
actual users, and compare those with the load generated by JMeter.
Adjust the JMeter test plan as necessary to reflect the target load.

You also need to look at the web application to see if some of the SQL
can be changed to reduce the database load.

>> For example, limiting the number of active connections, limiting
>> resources that can be used by a single connection.
>>
>> That might also give a better clue as to which queries are causing the
>> problem.
>
>
> rgds
> Karsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: DB crash

Posted by Karsten Gaul <ka...@exedio.com>.
> I don't know how to administer Oracle dbs

me neither...

> Surely there must be ways to configure the DB so that it remains
> active even under heavy load?
>
> Or at least it should degrade gracefully.

That's what I hoped for. Maybe the responses take some more time because 
the db blocks incoming requests until it's finished but it seems to 
consume all the memory until it recognizes that this wasn't the best 
idea. Unfortunately, at this point it's already too late.

Thanks anyway. I had hope that it was my fault because my test plan is 
badly configured.

> For example, limiting the number of active connections, limiting
> resources that can be used by a single connection.
>
> That might also give a better clue as to which queries are causing the problem.


rgds
Karsten

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: DB crash

Posted by sebb <se...@gmail.com>.
On 22 July 2010 12:39, Karsten Gaul <ka...@exedio.com> wrote:
> hum how do i put this?
>
> no but it is the only one using that specific db server. however, the same
> db server is used by at least one more app. That's why it is kinda bad that
> the db crashes because the other app is way more important than my load
> test. anyhow, this second app, being a qa version of mine, should not
> produce that much traffic that it, even in addition to my load test, causes
> the db to crash.

I don't know how to administer Oracle dbs, but it does seem strange
that an external application can cause it to crash.

Surely there must be ways to configure the DB so that it remains
active even under heavy load?

Or at least it should degrade gracefully.

For example, limiting the number of active connections, limiting
resources that can be used by a single connection.

That might also give a better clue as to which queries are causing the problem.

> rgds
> Karsten
>
> Am 22.07.2010 13:16, schrieb Deepak Goel:
>>
>> Hey
>>
>> Is your app the only app running on the server?
>>
>> Deepak
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: DB crash

Posted by Karsten Gaul <ka...@exedio.com>.
hum how do i put this?

no but it is the only one using that specific db server. however, the 
same db server is used by at least one more app. That's why it is kinda 
bad that the db crashes because the other app is way more important than 
my load test. anyhow, this second app, being a qa version of mine, 
should not produce that much traffic that it, even in addition to my 
load test, causes the db to crash.

rgds
Karsten

Am 22.07.2010 13:16, schrieb Deepak Goel:
> Hey
>
> Is your app the only app running on the server?
>
> Deepak

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: DB crash

Posted by Deepak Goel <de...@gmail.com>.
Hey

Is your app the only app running on the server?

Deepak


On 7/22/10, Karsten Gaul <ka...@exedio.com> wrote:
> Hi,
>
> I'm trying to figure out, why my oracle db occasionally crashes when i
> load test my website using jmeter. yes, i do have some flexible queries
> that are quite long. The funny thing is, as mentioned, that the db does
> not crash every time i run the same test. My admin told me the machine
> crashed due to excessive memory consumption.
> My test plan has four thread groups with a different number of threads
> and different ramp-up times whereof the longest is 5 mins. The overall
> amount of threads is 790. It's kinda weird that, when the db does not
> crash during the test, it hardly complains about anything. Neither is
> there too much load nor are there too many sessions.
>
> the db server has 4 gb of ram if that's of any use.
>
> I hoped to get to the limits of the webapp but the db seems to be the
> problem instead.
>
> Any ideas?
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>


-- 
Namaskara~Nalama~Guten Tag


   --
Keigu

Deepak
+91-9765089593
deicool@gmail.com

Skype: thumsupdeicool
Google talk: deicool
Blog: http://loveandfearless.wordpress.com
Facebook: http://www.facebook.com/deicool

Check out my Work at:
LinkedIn: http://in.linkedin.com/in/thumsupdeicool

"Contribute to the world, environment and more : http://www.gridrepublic.org"

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: DB crash

Posted by Karsten Gaul <ka...@exedio.com>.
hey chaitanya,

yeah it's an oracle db and the interface is jdbc. Fetching all the 
queries might be quite hard since there really are a lot of those. 
Furthermore, most of them are flexible queries that rely on the webapp 
backend. I probably could just compose some but that wouldn't be the 
same really.

rgds
Karsten

Am 22.07.2010 12:47, schrieb chaitanya bhatt:
> Karsten,
>
> If your datasource interface is JDBC, then try fetching all the queries
> fired during the load test from the database trace logs and fire those
> SQL queries directly to the database tier using Jmeter's JDBC sampler. The
> reason why I insist people to follow this strip down approach is because it
> allows you to focus on the layer which has the problem, which is obviously
> better. Plus, the load on the database is more when you fire queries
> directly on it, this can help you identify a problem much easier.
>
> PS: Is your database  - Oracle?
> -Chaitanya M Bhatt
> http://www.performancecompetence.com
> 2010/7/22 Karsten Gaul<ka...@exedio.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: DB crash

Posted by chaitanya bhatt <bh...@gmail.com>.
Karsten,

If your datasource interface is JDBC, then try fetching all the queries
fired during the load test from the database trace logs and fire those
SQL queries directly to the database tier using Jmeter's JDBC sampler. The
reason why I insist people to follow this strip down approach is because it
allows you to focus on the layer which has the problem, which is obviously
better. Plus, the load on the database is more when you fire queries
directly on it, this can help you identify a problem much easier.

PS: Is your database  - Oracle?
-Chaitanya M Bhatt
http://www.performancecompetence.com
2010/7/22 Karsten Gaul <ka...@exedio.com>

> Hi,
>
> I'm trying to figure out, why my oracle db occasionally crashes when i load
> test my website using jmeter. yes, i do have some flexible queries that are
> quite long. The funny thing is, as mentioned, that the db does not crash
> every time i run the same test. My admin told me the machine crashed due to
> excessive memory consumption.
> My test plan has four thread groups with a different number of threads and
> different ramp-up times whereof the longest is 5 mins. The overall amount of
> threads is 790. It's kinda weird that, when the db does not crash during the
> test, it hardly complains about anything. Neither is there too much load nor
> are there too many sessions.
>
> the db server has 4 gb of ram if that's of any use.
>
> I hoped to get to the limits of the webapp but the db seems to be the
> problem instead.
>
> Any ideas?
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>