Private Cloud gives unexpected responses
Posted: Mon Jan 23, 2023 11:06 pm
HI,
We are in the process of migrating large amounts of data into simPRO using the API but have encountered difficulty when sending requests too fast.
I am aware that rate limiting has been implemented - viewtopic.php?f=3&p=5245#p5245
but according to the below thread private clouds like the one we are using shouldn't be affected as it is a .simprocloud.com endpoint.
viewtopic.php?f=2&t=1877
We have been able to consistently encounter this issue when uploading 300 customers in parallel (we can't post multiple as we require information contained within the customer response body even with the display=all parameter).
/api/v1.0/companies/2/customers/individuals/?createSite=true
/api/v1.0/companies/2/customers/companies/?createSite=true
As seen above the response has a content-length of 0 which is problematic as we expect a response body. Are there any limits in place for private clouds we should be aware of? If it was rate limiting, we’d expect an 429 response code and not success 200.
Regards,
Thomas
We are in the process of migrating large amounts of data into simPRO using the API but have encountered difficulty when sending requests too fast.
I am aware that rate limiting has been implemented - viewtopic.php?f=3&p=5245#p5245
but according to the below thread private clouds like the one we are using shouldn't be affected as it is a .simprocloud.com endpoint.
viewtopic.php?f=2&t=1877
We have been able to consistently encounter this issue when uploading 300 customers in parallel (we can't post multiple as we require information contained within the customer response body even with the display=all parameter).
- throttling the requests results in successful submission of all customers
- submitting the customers in parallel results in 200 OK responses with no body
/api/v1.0/companies/2/customers/individuals/?createSite=true
/api/v1.0/companies/2/customers/companies/?createSite=true
- After an average of 70 submissions the responses no longer contain data (content length is zero)
- The failure isn't linked to a specific customers data as fails occur after seemingly any number of successful responses (I have noted as low as 3 and as high as 137) and appears to be linked with how fast the requests are sent to the server.
Code: Select all
headers: {
'strict-transport-security': 'max-age=31536000; includeSubdomains',
'content-type': 'text/html; charset=UTF-8',
'content-length': '0',
connection: 'close',
date: 'Sun, 22 Jan 2023 23:15:58 GMT',
server: 'lighttpd'
},
rawHeaders: [
'Strict-Transport-Security',
'max-age=31536000; includeSubdomains',
'Content-type',
'text/html; charset=UTF-8',
'Content-Length',
'0',
'Connection',
'close',
'Date',
'Sun, 22 Jan 2023 23:15:58 GMT',
'Server',
'lighttpd'
],
statusCode: 200,
statusMessage: 'OK',
Regards,
Thomas