1
votes

I am having a load test using Jmeter. And I got a stackoverflow exception when using the cache to store some user information. I had set the HTTP Cache Manager in the thread group and i assume it will work as a browser cache. But how I still got the exception when I only store the user information in the Server cache? (I ensure that the code is storing the information in the server side cache).

Anyone got some ideas about this issue? Or may anyone can give some information about the server side/browser side cache in Jmeter test plan? (I've checked some website but still can't figure out the concept about it) Thanks.

P.S. I'm working on the ASP.net web application

UPDATES: I checked that the issue was caused by the cache from the server side. The exception doesn't appear after the cache is disabled. And some more information that the cache I used the set method to update the cache. I still can't discover the solution or the reason of the StackOverflow Exception.

1
What have you tried so far? Please attach.Code_Ninja
I've tired to increase the "Max number of elements in cache" and "Clear cache each iteration" in the Jmeter HTTP Cache Manager. And I think it works that no stackoverflow exception appearing again. However, it confused me that how it affecting the server side cache by setting the Jmeter HTTP Cache Manager.Andrew Chan
I got some updates. The exception appears again. LOL But it takes more time (Samples passed) to appear the exception.Andrew Chan
on which side does the SO exception appear ? server or jmeter side? if jmeter can you show stacktrace ? what version are you using ? Thank youUBIK LOAD PACK
Oops I forget to provide the information. The exception appear on the server side (i'm using the debug mode) and it appear when it try to get the user information. I suppose that it already got the user information and stored in the cache (or it will get the data from DB if cache is null). And the Jmeter version is 4.0Andrew Chan

1 Answers

1
votes

Since the Stackoverflow happens on server side, there is a bug there you should investigate.

It can be caused by a missing parameter on your jmeter script that is extracted from a page that can be cached on browser side. Since JMeter cache does not cache the page content (only the fact that page is in cache), it will be empty in JMeter, so if you have an extraction it will give an empty value.

Now regarding the cache manager, it is aimed at emulating a browser cache.

You can read the reference documentation :

If a sample is successful (i.e. has response code 2xx) then the Last-Modified and Etag (and Expired if relevant) values are saved for the URL. Before executing the next sample, the sampler checks to see if there is an entry in the cache, and if so, the If-Last-Modified and If-None-Match conditional headers are set for the request.

Additionally, if the "Use Cache-Control/Expires header" option is selected, then the Cache-Control/Expires value is checked against the current time. If the request is a GET request, and the timestamp is in the future, then the sampler returns immediately, without requesting the URL from the remote server. This is intended to emulate browser behaviour. Note that if Cache-Control header is "no-cache", the response will be stored in cache as pre-expired, so will generate a conditional GET request. If Cache-Control has any other value, the "max-age" expiry option is processed to compute entry lifetime, if missing then expire header will be used, if also missing entry will be cached as specified in RFC 2616 section 13.2.4. using Last-Modified time and response Date.