Catalyst

by Zoho

Go to console

Serverless FAQ

Browse through questions related to working with the various components and features
of the Catalyst Serverless service, such as Functions, AppSail, Circuits, and Security Rules.

×

Functions

Why do I get the 'Basic I/O execution time exceeded' error while executing my function?

A time out issue will occur if you have not properly caught an exception in your function, or if you haven’t closed the context at the end of your function’s code. This issue can also occur if you haven’t installed all the necessary modules files. To resolve this issue, you must try the following:

  • Ensure that your code properly catches and handles exceptions
  • Check if context.close( ) is added at the end of your function
  • Ensure that you have installed all the necessary modules files based on the stack

What is the execution time limit for my function?
The execution time limit for Basic I/O and Advanced I/O functions is 30 seconds. The execution time limit for Event and Cron functions is 15 minutes.

Where should I install the external Node.js, Java, or Python dependencies in my function?
Navigate to the functions/{function_name} folder path in your local machine, and then install the Node modules if it is a Node.js function, or the JAR dependencies inside the lib folder if it is a Java function. For a Python function, you can install the required Python packages.

How do I send the request body to my Basic I/O function?
For Basic IO functions, the request data should be sent via the query parameters using the GET method. If you need to make native HTTP requests to your function, then you can try using Advanced I/O functions in Catalyst. Advanced I/O functions can handle native HTTP requests and responses and you can send your request payload as per your requirement.

Why do I get the error 'Class to be executed could not be found' while executing my Java function?
This error will occur only if the .class file for your java function is missing. If you uploaded the code via the Catalyst console , you will need to ensure that you uploaded it along with the .class files to resolve the issue. However, if you initialized your function via the CLI, you can use the command catalyst deploy. This command will compile the code automatically, create any of the missing dependency files, and upload the code to the Catalyst environment.

Why do I get an empty request body to my Advanced I/O function when the function URL is hit?
You have to use the appropriate body parser for the input type that you pass, to get the data in the request body in your Catalyst function.

How do I set the response headers and response type in a Basic I/O function?
Basic I/O functions do not support native HTTP requests and response headers. Therefore, you won’t be able to set the response headers and response type in Basic I/O functions. You can instead use Advanced I/O functions, as they support native HTTP requests and response headers.

Why do I get '(intermediate value).default is not a function' while executing my Node.js function?
To rectify this issue, you must export the code in your function to expose it. Ensure that you have added module.exports={module_variable_name} inside of your Node.js function.

How do I invoke an Event function?
Event Functions can only be invoked when the event that you configured an Event Listener has occurred. If the event you require has not occurred yet, you can perform an appropriate operation that will trigger the event listener to invoke the event function automatically. You can also test event functions from the CLI by passing sample payloads and validating their execution.

Why do I get 'CONCURRENCY_LIMIT_REACHED' exception with 429 error code when I hit my function endpoint?
The “CONCURRENCY_LIMIT_REACHED FOR THE FEATURE FUNCTIONS” exception will occur if you invoke your function concurrently beyond their defined limits. The maximum invocation limit without encountering the 429 error code is 1500 concurrent executions for a function that runs for 10 ms in the production environment, and 1000 concurrent executions for a function that runs for 10 ms in the development environment.

How do I resolve the error 'HTTP Error: 409 - The given function_name already exists'?

If you encounter HTTP Error: 409, it means that a function with the same name already exists in the Catalyst console.

You can either change the name in the catalyst-config.json file or delete the existing function in the remote console using the CLI or directly from the console

How do I access Catalyst Java functions in my Eclipse editor?

If you have created functions in the Catalyst remote console, you must download them to your local machine before you can access them in your editor. If you created functions on your local machine, you can skip to step 3.

To access Catalyst Java functions in your Eclipse editor:

  1. Download your function’s code from the remote console by executing the following Catalyst CLI command:

    $ catalyst pull

    You can refer to the Pull Resources help page for a detailed explanation.

    This will automatically create a functions directory in your project home containing your functions.

  2. Open your Eclipse editor. Navigate to File and then Open Projects From File System. catalyst_editor_q1_open_projects

  3. Click Directory next to Input Source in the pop-up. catalyst_editor_q1_directory

  4. Select the functions folder that was created using the CLI and click OK.

  5. Ensure that Add project to working sets is unchecked.

  6. Eclipse auto detects the Java functions in that folder. Select the functions you need from the list. catalyst_editor_q1_function_select

  7. Click Finish.

Your Catalyst functions are now accessible in Eclipse.

catalyst_editor_q1_eclipse_view

How can I include an external JAR in a Java function and bundle it along with the Catalyst Java functions?
  1. Open your Java functions in Eclipse as described in the previous answer.

  2. Right click on your project from the package explorer and click Build Path and then Configure Build Path… catalyst_editor_q2_configure_build_path

  3. Click the Libraries tab and select Add External JARs catalyst_editor_q2_jar_files

  4. Select the JAR to be included in the pop-up window and click Open.

  5. The selected JAR will be included in JARs and class folders on the build path. Click Apply and Close catalyst_editor_q2_apply

  6. Code your function with the JAR included and test the code by executing the following command from the CLI:

    catalyst serve

    You can learn about this command in detail from the Serve Resources help page.

  7. You can then directly deploy the function from the CLI without worrying about the additional JAR file. Execute the following CLI command to deploy the Java functions to the remote console along with the external JAR:

    catalyst deploy –only functions

    You can learn about this command in detail from the Deploy Resources help page.

  8. After the function has been deployed, you can verify whether the JAR has been added to your function group from the Catalyst console.

Circuits

How do I invoke my circuit using the Circuit URL?
You can invoke or execute your circuit through the API with a POST request using the Circuit URL as the request URL, and by passing the input through the request body in the JSON format along with the access token for the authorization of the request. You can also invoke your circuit inside your business logic using the Execute Circuit SDK method for the platform you require. The Catalyst console also enables you to test your circuit by passing input JSON and verifying the output.

Last Updated 2023-08-31 17:32:40 +0530 +0530