Migrated from Redmine #294 | Author: Anonymous Status: New | Priority: Normal | Created: 2018-11-27
I get this error randomly when I call setWorkday info to set days off.
JSONRpcClientException {
code: -32000,
message: ‘SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction’ }
At first I thought it was a throttling issue. When I send 5 requests very quickly they all get this error but when I space them out by 3 seconds the occurrence is less often but still happens with at least 1 out of ten calls. We are setting the availability of the provider to a day off on Tuesday.
I set the name to Monday and the index is 1 with the request below. However, I still get the same error. Setting the date makes it a “special day” and I want to set it as recurring which works 90% of the time but sometimes gives this (above) error.
I call the function once for each day of the week (7 times) when we first set up the service provider. This effectively wipes out their availability to zero to start, which is what we need. I’m calling the function once every 3.5 seconds because calling it faster produced far more errors however it still errors out regularly (one out of every 7 to 10 times) no matter how slow we cal your API. Any pointers would be greatly appreciated.
The provider is brand new when we create them and get the errors. We do have a lot of booking on our company account but far less than the amount we are paying for.