Get_logs error 413 Client Error

Hi, I’ve had some code that was working for over a month tracking a certain event in a contract on the Polygon Blockchain using get_logs. I was pulling events over a short time span of ~10min and this worked fine until a couple days ago(used the fromBlock to limit output to ~10 min timespan).

I’m now receiving an error:
“413 Client Error: Request Entity Too Large for url:xxxxx”

I’ve tried reducing the size of get_logs using fromBlock span to ~1 min but I’m still receiving the error. Checking to see if there’s an issue with this as it was working fine for over a month with 10 min timespan.

I’m using python with web3 library.

Thanks!

1 Like

Facing the exact same issue, on both Polygon and Polygon zkEVM. Also using python with web3 library.

I also got the error a week ago which was resolved by updating the rpc url (I guess it got changed from discover to pro). Don’t know what the problem is now. Do we need to do something on our end or will it get resolved?

Hello Hyper,

When working with logs and events on EVM-based chains, you may encounter a block range limit of 10,000 blocks when using methods like eth_getLogs or eth_getFilterLogs. This limit is in place to ensure maximum reliability for your calls and to prevent resource-intensive requests that could lead to degraded service.

Note: This range limit applies to Discover+, Build, and Scale plans. A block range limit of 5 is in place for free Discover accounts. Upgrading to any of our paid plans will allow for a 10k block range limit.

-Nick

Hello phoenix,

When working with logs and events on EVM-based chains, you may encounter a block range limit of 10,000 blocks when using methods like eth_getLogs or eth_getFilterLogs. This limit is in place to ensure maximum reliability for your calls and to prevent resource-intensive requests that could lead to degraded service.

Note: This range limit applies to Discover+, Build, and Scale plans. A block range limit of 5 is in place for free Discover accounts. Upgrading to any of our paid plans will allow for a 10k block range limit.

-Nick