Common errors encountered while using Serverless Functions
Handler not found
Error Messages
Function Handler does not exist, check that you provided the right HANDLER parameter …
Or
Provided Handler does not exist, or does not export methods properly
Cause
The systems cannot find the function which will handle the request. It can be related to an error in your code before your handle
function.
Possible solutions
-
Make sure to provide the right handler path.
-
If you used a zip file, make sure the dependencies are present in your zip package.
-
If you used the Serverless framework, ensure the
.serverless
directory created withserverless package
contains your zip file. -
Make sure that the dependencies folders (
node_modules
orpackage
in Python) are in package/include. -
Serverless Functions rely on Alpine Linux, therefore, some C-based libraries (
pandas
,tensorflow
,numpy
) will not work. Refer to the official documentation to safely add these libraries to your package.
Too Many Retries
Error messages
Too many retries, sub-runtime server did not come up in 10ms seconds
Cause
This error is returned by the runtime when it cannot process the request. It has several different origins.
Possible solutions
-
Make sure that you only imported the required dependencies and not the complete libraries.
-
Avoid performing too many initialization operations.
-
Update your function’s resources by provisioning more memory and more vCPU.
Function in error state
Cause
This error is returned when the function cannot start due to insufficient provisioned resources.
Possible solutions
Update your function’s resources by provisioning more memory and more vCPU.
Timeout error
Cause
Timeout happens when your function can’t return a results in the defined amount of time.
Possible solutions
-
Increase the Timeout parameter in the Scaleway console or with the API.
-
Update your function’s resources by provisioning more memory and more vCPU.
Failed to create a namespace
Cause
This issue can happen for the following reasons:
-
You created too many namespaces and reached your account’s quota.
-
You created too many Registry namespaces and reached your account’s quota.
Possible solutions
Make sure that you did not exceed the maximum number of allowed namespaces with the Scaleway console or with the API.