Hello team ! I Hope you're doing well !
I am experiencing a recurring failure in my scheduled tasks when targeting services hosted on platforms that employ "cold-starts" (specifically Render).
When a service is asleep, the initial request returns an HTTP 502 Bad Gateway status code. My application is configured to send a POST request, but the Load Balancer intercepts the request before it reaches my container and returns a verbose HTML-based error page.
The system currently marks these tasks as failed with the error message: Failed (output too large). It appears that cron-job.org is attempting to parse and store the entire HTML body of the 502 error page, which exceeds the memory buffer/limit set for response handling.
Steps to Reproduce
- Configure a cron job to POST to a service that is currently in a "sleeping" or "frozen" state (e.g., Render free tier).
- The load balancer returns an HTTP 502 error containing an HTML error page.
- The cron job attempts to process the response.
- The job fails with the status Failed (output too large) because it tries to buffer the HTML error response.
My API endpoint is just a basic ping as you can see here :
app.post('/api/test', (req, res) => {
return res.status(200).json({ response: "success !" });
});
My chron-job.org scheduled task is "EPEC Wake up 2" in case you can find it in your logs / DB.
Expected Behavior
The monitor should ideally handle 5xx error codes gracefully. If the response body is an HTML error page from a Load Balancer (or simply exceeds the buffer limit), the system should ideally:
Treat the task as a failure based on the status code (502) without attempting to buffer the large response body.
OR, provide a setting to "Ignore response body on error" for specific jobs.
Additional Context
This occurs even when the request method is set to POST. The issue is not the request method, but the fact that the platform's (Render.com in this case) infrastructural error page is being treated as a valid data payload, causing the internal buffer to overflow.
I believe this is a common use case for users hosting on free-tier cloud services who are using cron-job.org to keep their services warm.
Kind regards,
Facundo.
Hello team ! I Hope you're doing well !
I am experiencing a recurring failure in my scheduled tasks when targeting services hosted on platforms that employ "cold-starts" (specifically Render).
When a service is asleep, the initial request returns an HTTP 502 Bad Gateway status code. My application is configured to send a POST request, but the Load Balancer intercepts the request before it reaches my container and returns a verbose HTML-based error page.
The system currently marks these tasks as failed with the error message: Failed (output too large). It appears that cron-job.org is attempting to parse and store the entire HTML body of the 502 error page, which exceeds the memory buffer/limit set for response handling.
Steps to Reproduce
My API endpoint is just a basic ping as you can see here :
My chron-job.org scheduled task is "EPEC Wake up 2" in case you can find it in your logs / DB.
Expected Behavior
The monitor should ideally handle 5xx error codes gracefully. If the response body is an HTML error page from a Load Balancer (or simply exceeds the buffer limit), the system should ideally:
Treat the task as a failure based on the status code (502) without attempting to buffer the large response body.
OR, provide a setting to "Ignore response body on error" for specific jobs.
Additional Context
This occurs even when the request method is set to POST. The issue is not the request method, but the fact that the platform's (Render.com in this case) infrastructural error page is being treated as a valid data payload, causing the internal buffer to overflow.
I believe this is a common use case for users hosting on free-tier cloud services who are using cron-job.org to keep their services warm.
Kind regards,
Facundo.