Details
-
Bug
-
Resolution: Fixed
-
Critical
-
7.1.0
-
None
-
Untriaged
-
1
-
Unknown
Description
Observed while running py-tpcc:
I have reduced the script to create a function that is not updating/inserting -just basic selects and aggregates:
The script runs fine for a while and then starts returning :Couldn't connect to server
{'statement': 'EXECUTE FUNCTION doDelivery(1,7,"2021-12-22 16:06:52.042319")', 'creds': '[
]'}
{'requestID': '46ade909-53bd-487a-8139-8826cd50a942', 'signature': None, 'results': [
{'message': "Couldn't connect to server", 'stack': 'Error\n at N1QL (<anonymous>)\n at doDelivery (functions/n1qltpcc2.js:31:25)'}
], 'status': 'success', 'metrics': {'elapsedTime': '96.00886ms', 'executionTime': '95.884413ms', 'resultCount': 1, 'resultSize': 133, 'serviceLoad': 6, 'transactionElapsedTime': '93.989516ms', 'transactionRemainingTime': '14.906004289s'}}
Just before it has started returning error, it gives:
{'statement': 'EXECUTE FUNCTION doDelivery(1,8,"2021-12-22 16:06:51.958340")', 'creds': '[
]'}
{'requestID': 'f56e5b12-89bf-4922-9365-4920a301ea79', 'signature': None, 'results': [[1, 2128, 2, 2128, 3, 2128, 4, 2128, 5, 2128, 6, 2128, 7, 2128, 8, 2128, 9, 2128, 10, 2128]], 'status': 'success', 'metrics': {'elapsedTime': '82.317586ms', 'executionTime': '82.195733ms', 'resultCount': 1, 'resultSize': 72, 'serviceLoad': 12, 'transactionElapsedTime': '79.470632ms', 'transactionRemainingTime': '14.920522373s'}}
which is the correct result. This shows there is no error in the function.
I have attached the result file.
Is there some extra configuration setup needed for the proxy server, v8engine or js-evaluator?
Also, CPU is at less than 50%.
I have attached a screenshot of the system stats as well.
also, once it gets in that state I tried to run the function via cbq and same result.
The server however is up and running.
cbq> EXECUTE FUNCTION doDelivery(1,5,"2021-12-22 16:46:07.970766") ;
{
"results": [
{ "message": "Couldn't connect to server", "stack": "Error\n at N1QL (<anonymous>)\n at doDelivery (functions/n1qltpcc2.js:10:24)" }
],
cbq> select 1;
{
"results": [
{ "$1": 1 }
],
}