For Workes & Pages, what is the name of the domain?
What is the error number?
No specific error number displayed.
What is the error message?
No error message is returned, but CPU usage exceeds the free plan limit (10ms).
What is the issue or error you’re encountering
I’m using a Cloudflare Worker to fetch paginated data from the API endpoint: https://freetestapi.com/api/v1/products?page=1&limit=10 The Worker processes the data and returns it to the frontend. However, when the number of products increases, the CPU time jumps significantly (e.g., ~90-120ms for 1000 products). Despite exceeding the CPU time limit for the free plan, there’s no error message or indication of an issue in the Worker logs.
What steps have you taken to resolve the issue?
Reduced the number of products per page to stay within the limit.
Implemented caching via KV storage to minimize redundant API calls.
Split large requests into smaller batches for processing.
What are the steps to reproduce the issue?
Create a Cloudflare Worker to fetch data from the endpoint:
https://freetestapi.com/api/v1/products?page=1&limit=100
Process and return the response in JSON format to a frontend application.
Test with smaller limits (e.g., 10 products) and observe CPU usage in the dashboard (~2ms).
Increase the limit to 1000 products and observe the CPU usage spike (~90-120ms).
Despite exceeding the limit, the Worker continues to execute without throwing errors. Is this expected behavior, or am I missing something in how CPU usage limits are enforced?
Any advice or troubleshooting tips would be appreciated.