You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Stephen Nelson <st...@eccostudio.com> on 2022/03/07 16:34:16 UTC

neo4j queries not recording query results

I'm using jmeter to directly test neo4j queries but notice that when I try
to record the query results I get an error message:

Cannot access records on this result any more as the result has already
been consumed or the query runner where the result is created has already
been closed.

This is happening for all queries, even a MATCH (n) RETURN COUNT(n) which
should return a result no matter the content of the underlying database.
I'm using jmeter 5.4.3 on Windows running in GUI mode with a single
user/iteration for test purposes.

Please help me to understand what I'm doing wrong. Many thanks.

Re: neo4j queries not recording query results

Posted by Stephen Nelson <st...@eccostudio.com>.
On Mon, Mar 7, 2022 at 6:22 PM Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

>
> Am 07.03.22 um 19:16 schrieb Stephen Nelson:
>
> Thanks for that. I will try a minimal reproducer to see if it's a problem
> with my config.  Otherwise I'll compile the latest nightly and see if that
> helps.
>
> No need to compile the latest nightly, as they can always be downloaded
> from https://nightlies.apache.org/jmeter/nightlies/
>
> You only would have to compile something, if you would have a patch to
> apply.
>
>
> Thanks for the pointer. I tried the latest snapshot and it now works fine.
Thank you!

Re: neo4j queries not recording query results

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 07.03.22 um 19:16 schrieb Stephen Nelson:
> On Mon, Mar 7, 2022 at 5:58 PM Felix Schumacher <
> felix.schumacher@internetallee.de> wrote:
>
>> When I test the sampler using a docker container with a neo4j database like
>>
>> docker run --name neo4j -p7474:7474 -p7687:7687 --env
>> NEO4J_AUTH=neo4j/test neo4j:latest
>>
>> and access it with a simple configuration and sampler using the query
>> "MATCH (n) RETURN count(n);" with "Record Query Results" to true, the test
>> plan seems to work for me (on current nightly).
>>
>> Felix
>>
> Dear Felix.
>
> Thanks for that. I will try a minimal reproducer to see if it's a problem
> with my config.  Otherwise I'll compile the latest nightly and see if that
> helps.

No need to compile the latest nightly, as they can always be downloaded 
from https://nightlies.apache.org/jmeter/nightlies/

You only would have to compile something, if you would have a patch to 
apply.

Felix

>
> Stephen
>

Re: neo4j queries not recording query results

Posted by Stephen Nelson <st...@eccostudio.com>.
On Mon, Mar 7, 2022 at 5:58 PM Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

> When I test the sampler using a docker container with a neo4j database like
>
> docker run --name neo4j -p7474:7474 -p7687:7687 --env
> NEO4J_AUTH=neo4j/test neo4j:latest
>
> and access it with a simple configuration and sampler using the query
> "MATCH (n) RETURN count(n);" with "Record Query Results" to true, the test
> plan seems to work for me (on current nightly).
>
> Felix
>

Dear Felix.

Thanks for that. I will try a minimal reproducer to see if it's a problem
with my config.  Otherwise I'll compile the latest nightly and see if that
helps.

Stephen

Re: neo4j queries not recording query results

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 07.03.22 um 18:50 schrieb Felix Schumacher:
>
>
> Am 07.03.22 um 18:45 schrieb Stephen Nelson:
>> On Mon, Mar 7, 2022 at 5:32 PM Felix Schumacher <
>> felix.schumacher@internetallee.de> wrote:
>>
>>> Do you get more information when the exception is logged?
>>>
>>> Felix
>>>
>>>
>> Dear Felix,
>>
>> Thanks for your reply. Unless I'm missing something I'm not seeing any
>> exception logged at all. I have turned up logs to the ALL level.  I only
>> got the above error message by going to View Results Tree --> Selecting the
>> request and selecting the Sampler result tab.
>
> After a quick glance at the code and a bit of searching the internet, 
> I believe, this might be a bug as we are reading the response outside 
> a transaction and 
> https://stackoverflow.com/questions/62179422/resultconsumedexception-with-micronaut-and-neo4j-cannot-access-records-on-this 
> and the linked docs on that entry suggests, that we would have to do that.
>
> Would you be able to compile JMeter for yourself and apply a patch to 
> try that out?
>
When I test the sampler using a docker container with a neo4j database like

docker run --name neo4j -p7474:7474 -p7687:7687 --env 
NEO4J_AUTH=neo4j/test neo4j:latest

and access it with a simple configuration and sampler using the query 
"MATCH (n) RETURN count(n);" with "Record Query Results" to true, the 
test plan seems to work for me (on current nightly).

Felix

> Felix
>
>> Stephen
>>

Re: neo4j queries not recording query results

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 07.03.22 um 18:45 schrieb Stephen Nelson:
> On Mon, Mar 7, 2022 at 5:32 PM Felix Schumacher <
> felix.schumacher@internetallee.de> wrote:
>
>> Do you get more information when the exception is logged?
>>
>> Felix
>>
>>
> Dear Felix,
>
> Thanks for your reply. Unless I'm missing something I'm not seeing any
> exception logged at all. I have turned up logs to the ALL level.  I only
> got the above error message by going to View Results Tree --> Selecting the
> request and selecting the Sampler result tab.

After a quick glance at the code and a bit of searching the internet, I 
believe, this might be a bug as we are reading the response outside a 
transaction and 
https://stackoverflow.com/questions/62179422/resultconsumedexception-with-micronaut-and-neo4j-cannot-access-records-on-this 
and the linked docs on that entry suggests, that we would have to do that.

Would you be able to compile JMeter for yourself and apply a patch to 
try that out?

Felix

>
> Stephen
>

Re: neo4j queries not recording query results

Posted by Stephen Nelson <st...@eccostudio.com>.
On Mon, Mar 7, 2022 at 5:32 PM Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

> Do you get more information when the exception is logged?
>
> Felix
>
>
Dear Felix,

Thanks for your reply. Unless I'm missing something I'm not seeing any
exception logged at all. I have turned up logs to the ALL level.  I only
got the above error message by going to View Results Tree --> Selecting the
request and selecting the Sampler result tab.

Stephen

Re: neo4j queries not recording query results

Posted by Felix Schumacher <fe...@internetallee.de>.
Do you get more information when the exception is logged?

Felix

Am 07.03.22 um 17:34 schrieb Stephen Nelson:
> I'm using jmeter to directly test neo4j queries but notice that when I try
> to record the query results I get an error message:
>
> Cannot access records on this result any more as the result has already
> been consumed or the query runner where the result is created has already
> been closed.
>
> This is happening for all queries, even a MATCH (n) RETURN COUNT(n) which
> should return a result no matter the content of the underlying database.
> I'm using jmeter 5.4.3 on Windows running in GUI mode with a single
> user/iteration for test purposes.
>
> Please help me to understand what I'm doing wrong. Many thanks.
>