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

unhandled rejection: Rejection(PayloadTooLarge) #10

Closed
polyphia opened this issue Jun 26, 2023 · 5 comments
Closed

unhandled rejection: Rejection(PayloadTooLarge) #10

polyphia opened this issue Jun 26, 2023 · 5 comments

Comments

@polyphia
Copy link

polyphia commented Jun 26, 2023

First of all I need to say I have no idea if this simulator is a viable option for handling a high amount of txs in a short period of time (in a single request), let's say anything between 200 and 500 txs for a given block .

Having said that, there is a payload size limit for the server accepting the curl requests and the bottleneck is reached quite easily so simulating anything like even 50 transactions in a single request is impossible .

I tried modifying warp to accomodate for bigger payload but kept getting the same error .

unhandled rejection: Rejection(PayloadTooLarge)

Where could we modify the maximum payload size please ?

Thanks

@ape-dev-cs
Copy link
Contributor

Could we get a full backtrace? I have a feeling that this may be something to do with the HTTP server.

@polyphia
Copy link
Author

Yea it's most likely the http server, I thought warp was what was being used so tried to change a few things there .

This is all I get in the API logs :

Compiling transaction-simulator v0.1.0 (/home/sim/transaction-simulator) Finished dev [unoptimized + debuginfo] target(s) in 9.41s Runningtarget/debug/transaction-simulator INFO ts::api > Starting server on port 9080 unhandled rejection: Rejection(PayloadTooLarge) INFO ts::api > 127.0.0.1:38486 "POST /api/v1/simulate-bundle HTTP/1.1" 500 "-" "axios/0.27.2" 347.997µs

@devanoneth
Copy link
Contributor

Hey, it's set here: https://github.com/EnsoFinance/transaction-simulator/blob/main/src/lib.rs#L102

Would be open to a PR which makes it configurable with an env var :)

@polyphia
Copy link
Author

@devanoneth thanks for this, I can see it now in the last line !

Sadly I don't code in RUST , hopefully someone will do it

@MartinquaXD
Copy link
Contributor

Fixed in #24

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

4 participants