PaulWieland / node-red-contrib-saprfc

A node-red node for making Remote Function Calls to an SAP system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Only 4 RFC connections possible

MrSJS opened this issue · comments

commented

Hi,

I tried to increase the number of RFC connections in line 93 in saprfc.js but it doesn't work. Is there another limiter somewhere?

After 4 parallel RFC connections, all other http requests have to wait until an RFC connection is finished.

This problem does not exist with Wildfly and JCo.

That queue limit should be the only setting that controls parallel connections. In my limited testing, going beyond 4 parallel streams did not improve performance at all, while there was a noticeable improvement in performance going from 1 to 2, 2 to 3, and 3 to 4.

Here is the async.queue documentation in case you need it: https://caolan.github.io/async/v3/docs.html#queue

commented

I believe you that there is currently no performance improvement after 4 RFC connections, because no more than 4 RFC connections are established. If I set an external breakpoint in SAP, only 4 RFC connections are established, not more, even if I send more requests. The fifth request has to wait.
If I have a lot of clients that make longer queries in SAP, then it would be nice if more parallel requests were possible here.

The setting works fine for me. I tested up to 20 connections and could see all of them in SM04. Are you restarting NodeRED after making the change to the queue limit?

commented

Yes, I restarted NodeRED. I changed the value to 1 and 8. However, the number of connections only rose to a maximum of 4.
Only 4 clients were possible at the same time at the external breakpoint in SAP. With Wildfly and JCo there was no limit. Could there be a limit here if only one RFC user is used?

That can't be either. When I have reached 4 RFC connections. NodeRED also no longer processes any other http requests that have nothing to do with SAP. It seems as if everything in nodeRED has to wait until the 4 RFC calls have been processed.

It works just fine here...

image

Here is the flow I tested with:

    {
        "id": "e3e5aec2.45743",
        "type": "inject",
        "z": "379256e.c6e89aa",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 200,
        "y": 120,
        "wires": [
            [
                "cf3f11f2.1c84a"
            ]
        ]
    },
    {
        "id": "961b30c3.b75d3",
        "type": "read table",
        "z": "379256e.c6e89aa",
        "name": "read table",
        "system": "",
        "table": "MARA",
        "selectedFields": [
            "MATNR"
        ],
        "x": 480,
        "y": 120,
        "wires": [
            []
        ]
    },
    {
        "id": "cf3f11f2.1c84a",
        "type": "function",
        "z": "379256e.c6e89aa",
        "name": "",
        "func": "var list = [];\n\nfor(var i = 0; i < 100; i++){\n    list.push({\n        payload: {\n            OPTIONS: [\"MATNR EQ '000000000000000000'\"]\n        }\n    })\n}\n\nreturn [list];",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 340,
        "y": 120,
        "wires": [
            [
                "961b30c3.b75d3"
            ]
        ]
    }
]
commented

Thank you for your answers. I think the issue has nothing to do with your code.

SAP/node-rfc#232