Getting error while interacting to blockchain to fetch events

I am trying to fetch events from blocks and sometime getting this error –
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
Error: ETIMEDOUT
at Timeout._onTimeout

Emitted ‘error’ event on Web3ProviderEngine instance at:
at safeApply
please help me with solution and explaination why this error occured?

update to above error after i got solution…
cause for error - As for testnet we are using public rpc url to connect to polygon network. So, sometime due to heavy load it won’t respond.
earlier i was using - https://rpc-mumbai.matic.today
now i am using – https://rpc-mumbai.maticvigil.com
you can use any one of them if one is not working –
https://rpc-mumbai.matic.today or
https://matic-mumbai.chainstacklabs.com or
https://rpc-mumbai.maticvigil.com

if error still persists -
You can sign up for a dedicated free RPC URL at the following:

  • Moralis
  • Infura