Have you tried increasing the timeout value? It may be that the more limited resources on your Render service (than on your development machine) is taking longer to process the request and return the JSON file. Increasing the timeout value will hopefully help give the service enough time to return the file and thus no longer time out.
Another option would be to try out upgrading to a paid instance type with more resources, so the file may get processed and then returned faster.
Regards,
Mike
Render Support Engineer, MT (UTC-6, UTC-7 in Winter)
Yes, I did increase the timeout (timeout=40) - however, this sounds fishy to me, since we know the endpoint answers in 3~4 seconds (and the payload is quite light) - I already tried to set timeout=120 and the result is the same - sure, I can try to increase it a bit more , but it sounds strange to me…
By checking my code dont you see any other alternative?
Sure, I can switch to a payed instance, but I would be very disapointed if the situations remains
Just for clarification, are you referring to the same endpoint regarding a 3 second response and the timeout? Perhaps describe in more detail the sequence of events that leads to the timeout?
Regards,
Mike
Render Support Engineer, MT (UTC-6, UTC-7 in Winter)
I can reproduce the behavior you are describing. Out of curiosity, why is your app calling itself at a different endpoint over HTTPS? When you call /elenco_aziende why not just have the code internally route to the underlying code for /api/aziende? Is there a particular reason why the code can’t remain internal and instead must fetch data over another public API call within the same service?
Beyond that suggestion, you would need to reach out to us privately (via the Help link in the Render Dashboard) for us to be able to take a closer look at this service. Be sure to provide the service name or id.
Regards,
Mike
Render Support Engineer, MT (UTC-6, UTC-7 in Winter)
Hi @Mike_Marinaro,
Thank you very much for your care and attention.
Out of curiosity, why is your app calling itself at a different endpoint over HTTPS?
I’m setting up a ‘database’, and since I want to make the data public through the API - /api/aziende - I want to be the first to consume and use that same data to build my html pages -