2

I am using the graphaware php client for neo4j.

When running a query with a "large" parameter object (about 200 lines in pretty print, field values are 30 characters max), it freezes.

The $queryparams object looks like

{
    "data": {
        "someproperty": 30000,
        "anotherproperty": "stringentry",
        <about 200 more like this here, partially nested>
    }
}

where

  1. everything is inside the data wrapper
  2. most of the 200 entries are garbage that the query never uses

The line

$queryresult = $client->run($query, $queryparams);

becomes long-running and gets time-outed by nginx. I tried

try
{
    $queryresult = $client->run($query, $queryparams);
} catch (Neo4jException $e)
{
    return "error";
}

to no avail.

Running the same query with the same parameters in the neo4j browser, I get my results instantaneously.

Any ideas about what is causing the problem? Is it graphaware?

EDIT: I posted too fast, but this was unexpected to me: there is a field "0": ... somewhere in the $queryparams inside the garbage I mentioned. That is what causing the problem. Is this intended behaviour?

tscherg
  • 1,032
  • 8
  • 22
  • Yes, map keys can only be alphabetical – Christophe Willemsen Aug 18 '17 at 09:11
  • @ChristopheWillemsen, that does not seem to be the whole story: alphanumeric is allowed (even starting with numbers) as long as the key is not consisting entirely of numbers. Also, when using http instead of bolt, i can even use number-only keys. Still - is it really intended that the php class freezes (instead of throwing an exception)? – tscherg Aug 18 '17 at 15:48
  • yes bolt should throw an exception as well, would you be able to provide the query and a dump of the parameters passed so I can create a test for it – Christophe Willemsen Aug 21 '17 at 03:02

0 Answers0