Frequently Asked Questions
1. Why does my deployed service encounter Runtime Error
?
There are several reasons that might cause the Runtime Error
issue:
--- Starting Service Invocation --- Service ID: c5df377d0bdb4a4bbae071027649eb85 --- Task payment: 100 --- User input: 1024 --- Parsing configuration: done --- Creating task on blockchain --- Connecting the blockchain: done --- Calculating task hash: done --- Sending task to blockchain: done --- Waiting the blockchain to confirm the task: done --- Created task ID: 02cf9e6d6506473b9ba94e894205a1f0 --- Invoking dispatcher --- Connecting to dispatcher: done --- Building secure channel: done --- Sending Request to dispatcher: done --- Getting response: done --- Got worker: 101.95.182.98:10000 --- Invoking worker --- Connecting to worker: done --- Building secure channel: done --- Sending request to worker: done --- Getting execution result: done --- Invocation result: --- Error number: 4 --- Error message: Runtime Error
1) Out of Memory
If you run services that use a lot of memory, you may run into the this error. To solve this, you may reduce the space required like the stack and heap space to run your contact.
You may refer to the following table:
Memory | Upper Limit |
---|---|
Total | 3GiB |
Heap | 256MiB |
Stack | 20MiB |
Tip
We highly recommend that you should avoid using deep recursion
in the service; otherwise it will be possible to meet Runtime Error
for your service when clients request services. Instead, you may use iteration
or tail recursion
.
2) Non-Standard Library
Sometimes you may import some non-standard libraries when developing your services on your computer. Since the TEEX worker platform may not install these dependencies, your service may not function as expected.
Note
Please use teex-client
to verify your service can run successfully on the TEEX platform. For any problem, please feel free to contact us or join the discussion in our community.
3) Timeout
TEEX platform has a timeout mechanism so that all services will be executing within a possible time limit. If the service contains any infinite loop (so-called "dead loop"), it will return Runtime Error
to users when timeout.
Note
Currently, the timeout value is set to 30 minutes
for each service at a time. Beware that unhandled input or careless service logic might possibly fall into a dead loop, which finally leads to a timeout.
4) Unexpected Inputs
Even though your service can run well under your verification, the user may still be able to manipulate the inputs and make your services behave unexpectedly. TEEX is not responsible for filtering users' inputs.
Note
The execution results may depend on the inputs. In this case, please implement an input checker to make your own service more robust.
5) I/O Actions
TEEX Executors are located inside TEE sandboxes. The I/O channels are highly restricted in order to protect the TEEX platform.
You can issue I/O related syscall (e.g., socket
, open
, etc.), but TEEX platform will return -1
to these syscalls. Your service needs to deal with this issue. We suggest that you not try to deploy a service with these calls.
6) Miscellaneous
On this stage, TEEX does not allow a service to either invoke fork
or exec
syscalls, which means, these actions will inevitably trigger a Runtime Error
that returns to users.
2. Why the clients encounter Network Error
?
The TEEX TestNet is a distributed network, that is consist of the underlying blockchain, TEE-backed storage (TEE-DS), TEE platform (workers). The network strongly leans on the connectivity of the networking of the globe. When Network Error
happens, it may be due to the following reasons:
- Your in-house network is temporarily not working;
- the blockchain is currently busy;
- the worker is the denial of service;
- the dispatcher's network cannot be reached.
Tip
You may try with more times to handle this issue. Please contact us when you fail a couple of times.
3. My service fails to be deployed, what do I do?
TEEX relies on Etherum network as Layer-1. Etherum may reach consensus in a while. The service will be deployed successfully after the chain confirms the service manager.
Tip
We suggest that the service developer store a copy of the service code locally. Once the contact fails to deploy, the developer can try again to obtain a new service ID
.
4. Why can't I reference my service on TEEX TestNet?
The states preserved on the TEEX TestNet sometimes may need to be reset. We expect this to occurs rarely. However, it depends on the running status of the underlying blockchain. When this happens, please resubmit your service to the TEEX-TestNet via the teex-deploy
tool. As a warm reminder, please back up your service locally in case this issue occurs.
Warning
TEEX TestNet will not be responsible for lost profits, revenues, or data, financial losses, or indirect, special, consequential, exemplary, or punitive damages of the deployed data.