Connection refused when service sends requests to sleeping service through private network until woken up
cybermb
HOBBYOP

7 months ago

When sending a request to a sleeping service request should be pending until service is woken. This happens correctly if sending request through public domain, for example, public url using postman. Request takes longer to complete due to cold boot but it completes successfully. However, this does not work when service is woken up by other service through private network. Instead, connection is refuced



Reproduction:
1. Create a new function with "Rest API" template with serverless mode enabled
2. Create a new function for sending request
3. Add variable
TARGET_URL = http://${{function-bun.RAILWAY_PRIVATE_DOMAIN}}:8080
4. Deploy functions
5. Wait for API function to sleep
6. Run Requester function
7. Run Requester function again after API function is woken

Under Review

0 Threads mention this feature

1 Replies

nerdaliciousch
PRO

a month ago

Same issue here. We are using oauth2-proxy with standard timeouts for a downstream HTTP service. The proxy when hit from the internet is waking up correctly (request is idling until proxy responds). The proxy's connection to the upstream will in turn fail with a "connection refused". Retrying the same request eventually succeeds when the upstream service is woken up.


Loading...