Closed rspurrell closed 2 years ago
Hi @rspurrell,
Thanks for getting in touch. The problem was on our end. We've recently added additional capacity to handle more requests. That should do the trick. Please let us know if you run into 500 errors or any other trouble at dataservices@trade.gov.
Thanks again,
James
Since the move to the new service location on Dec 6, we're periodically receiving 500 errors from the trade.gov servers. The following is an example of the responses received:
{ "statusCode": 500, "message": "Internal server error", "activityId": "e4297dcb-e869-4e24-9016-5bcf20613ba0" }
Once the 500 error responses are received, every subsequent request errors with a 500 until we restart our client. This is odd since performing a restart on the client-side to fix a 500 server-side error should not fix the issue. Also, requests from a dev machine using the same API key do not error while this is occurring with the production client. If the issue is on our client side I would think that the server should return a 4XX error code indicating the client's issue.
The only two changes we made to the client were to move the API key to use the "subscription-key" header instead of "Bearer", and added a "Cache-Control: no-cache" header as identified in your example (C#). Since I've begun troubleshooting this issue, I've added a "Connection: Close" header in the hopes that the issue is related to connections being maintained on your server-side resulting in further attempts from our client being denied. I have yet to receive further 500 errors since this last update, but so far client restarts have resolved the issue for a few days before occurring again.
Could some insight please be provided into why we're receiving this 500 server-side error?
Thanks, Roger