[SOLVED] Code = 4040 (private use), reason = Draining connection

Hi,
I have python code where I try to retrieve data block every 2 seconds using function call
w3.eth.get_block(‘latest’,full_transactions=True)

Every now and then I am getting following error. Frequency is of error is random. It could be roughly 2mins,15mins, 1hour. No particular pattern.

code = 4040 (private use), reason = Draining connection

I don’t seem to violate the 1500 reqs/min limit with that. What might be the reason for this?

regards,
Pramod

I think that it only means that some connection is closing. You should retry after you get that error.

Thanks for the lead. Yes I had to retry