Hey everyone,
I am trying to deploy my implementation for ABHA APIs, and locally it seems to be working fine, but when the server is trying to make a API call, the request is getting timed out
Can someone please help me
Hey everyone,
I am trying to deploy my implementation for ABHA APIs, and locally it seems to be working fine, but when the server is trying to make a API call, the request is getting timed out
Can someone please help me
Hi
Can you please share which APIs you are getting time out
Thanks, Cheers
GC
All the APIs of ABHA are giving time-out errors
For instance, when I try the, /v1/search/searchByHealthId
API locally on my system, I get a success response with the correct info.
But when I try to invoke this API on the server, It always times out
The same thing happens with all the other ABHA apis
you need to check the deployment strategy.
Can you help me understand how do you trigger any api?
I am sorry but I don’t understand, what kind of change are you referring to, in the deployment strategy?
I call the ABHA APIs using the Python requests module, once the APIs give a response, I add the business logic on top of that
i meant to ask
you have deployed your code(which has ABHA APIs implementation and runs from local) to some server, and now you are trying to trigger this code from your local
if its correct then where do you get timeout , is your call reaching to server and are you able to trigger the ABHA APIs?
Yes, the calls are indeed reaching the server where I have deployed the APIs
Here’s an image of how I have built the system
In this image, the blocks which are green mean they are working fine, but the ones in the red are not working, i.e. giving timeout error
Hope you get a clear picture of where the error is occurring
You mean you are able to get the token but not able to get the search data??
if token is coming that means server is able to connect to ABDM, please print the CURL and URL in the logs at server and share
Cheers,
GC
Yes
The Python request looks like this-
access_token = "some access token"
health_id = "some health id here"
resp = requests.post(
url="https://healthidsbx.abdm.gov.in/api/v1/search/searchByHealthId",
json={"healthId": health_id},
headers={"Authorization": "Bearer " + access_token}
)
print(resp.status_code)
print(resp.content)
These are the server logs-
...
[2023-04-06 11:35:03 +0000] [13] [CRITICAL] WORKER TIMEOUT (pid:23)
[2023-04-06 11:35:03 +0000] [23] [INFO] Worker exiting (pid: 23)
[2023-04-06 11:35:03 +0000] [25] [INFO] Booting worker with pid: 25
...
Sir, please look into this issue. We were told that the NHA server load is going over capacity which is why the request is being timed out. Is this true?
Please share curl and postman screenshot to debug the issue.
It’s working properly in my local system and postman
But after deploying it to the server, the APIs are giving timeouts
cURL-
curl -X POST 'https://healthidsbx.abdm.gov.in/api/v1/search/searchByHealthId' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer access_token' \
--data 'healthId=health_id'
Kindly insert healthID, eg: anil.singh . For reference follow: https://app.swaggerhub.com/apis-docs/abdm.abha/abha-service/1.0#/
yes, even if we gave a valid health ID, it is still not working
We found the fix ourselves. The request was being routed through a server based outside India, which is why it could not connect. We used our servers in India and it worked fine.