getPastEvents Connection error #1906
Description
https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#getpastevents
I wrote the code exactly the same one with example code.
And it works perfectly before few days ago.
But now I get the connection error most of the time when I try to call it.
contract.getPastEvents('Transfer', {
fromBlock: 0,
toBlock: "latest",
filter: {
isError: 0,
txreceipt_status: 1,
[type]: toAddress
}
}, function(error, events){
});
Very simple code, worked well just few days ago.
I still can get the returned value from time to time, chances like about 1 out of 10.
So I assume that it's not the code issue.
And it also takes few seconds to get it.
Except for getPastEvents, everything works well such as check balance, sending transaction.
So I assume that there is no problem with global settings.
Any assumption for this problem?