Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trc20Contract transfer cause Error: 503 - Status: Service Temporarily Unavailable #98

Open
liuniuaaa opened this issue Jul 17, 2023 · 4 comments

Comments

@liuniuaaa
Copy link

I used trident to apply trc20 contract transfer. I know TronGrid has IP frequency limits for all requests. But we apply no more than 100 Trc20Contract transfers per day and no more than 2 Trc20Contract transfers per minute. I think we didn't request frequently, but when my service ran a few hours later, the 503 problem would occur. If I restart my service, it would be ok, but a few hours the problem would occur again. Does trident has any other communication with trongrid cause this problem? Could you help me solve this problem?

@ClarkChenc
Copy link

ClarkChenc commented Jul 18, 2023

hi,@liuniuaaa, do you have any log about such issues? Maybe it can help to find the reason. 503 error usually araises as exceeding TronGrid access limit :

Before your daily request amount is up, when using API KEY to access, the access frequency per second is limited to 15qps. If your requests exceed the daily amount, then your access frequency per second is 5qps. Either way, if you exceed the access frequency, a 503 error will be returned.

If you need more stable service, you can build your own node with the doc: https://github.com/tronprotocol/tron-deployment. May it help you.

@liuniuaaa
Copy link
Author

UNAVAILABLE: HTTP status code 503
invalid content-type: text/html
headers: Metadata(:status=503,server=openresty,date=Fri, 11 Aug 2023 02:36:19 GMT,content-type=text/html,content-length=52)
DATA-----------------------------
Error: 503 - Status: Service Temporarily Unavailable
io.grpc.StatusRuntimeException: UNAVAILABLE: HTTP status code 503
invalid content-type: text/html
headers: Metadata(:status=503,server=openresty,date=Fri, 11 Aug 2023 02:36:19 GMT,content-type=text/html,content-length=52)
DATA-----------------------------
Error: 503 - Status: Service Temporarily Unavailable
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156)
at org.tron.trident.api.WalletGrpc$WalletBlockingStub.broadcastTransaction(WalletGrpc.java:5004)
at org.tron.trident.core.ApiWrapper.broadcastTransaction(ApiWrapper.java:404)
at org.tron.trident.core.contract.Trc20Contract.transfer(Trc20Contract.java:159)

please check the log.

@ClarkChenc
Copy link

UNAVAILABLE: HTTP status code 503 invalid content-type: text/html headers: Metadata(:status=503,server=openresty,date=Fri, 11 Aug 2023 02:36:19 GMT,content-type=text/html,content-length=52) DATA----------------------------- Error: 503 - Status: Service Temporarily Unavailable io.grpc.StatusRuntimeException: UNAVAILABLE: HTTP status code 503 invalid content-type: text/html headers: Metadata(:status=503,server=openresty,date=Fri, 11 Aug 2023 02:36:19 GMT,content-type=text/html,content-length=52) DATA----------------------------- Error: 503 - Status: Service Temporarily Unavailable at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262) at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243) at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156) at org.tron.trident.api.WalletGrpc$WalletBlockingStub.broadcastTransaction(WalletGrpc.java:5004) at org.tron.trident.core.ApiWrapper.broadcastTransaction(ApiWrapper.java:404) at org.tron.trident.core.contract.Trc20Contract.transfer(Trc20Contract.java:159)

please check the log.

There was nothing unusual about this process, it was a typical 503 error.

@kaiweicai
Copy link

I meet the problem same. I checked my code many times, I found I invoke the api for check the dicimals of contract and check the balance of user before invoking the transfers method. So I canceled the other method. It can works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants