INFURA / infura

Official Public Repository for INFURA
https://infura.io
380 stars 62 forks source link

Ropsten Websocket Down? #110

Open Plinpod opened 6 years ago

Plinpod commented 6 years ago

Hello,

The last view days I have not been able to make a websocket connection to the ropsten testnet.

wss://ropsten.infura.io/ws

I am getting continuous "Connection dropped by remote peer" errors. It was working more or less fine about 2 days ago. Anyone else running into the same issue?

Thank

Am0rfu5 commented 6 years ago

@Plinpod is this only for Websocket and only on ropsten?

ec2 commented 6 years ago

Should be up and running. Are you still having issues?

Plinpod commented 6 years ago

@jamatulli Yep its only for the Websocket @tueric Just tested again same issues

JeeChoi commented 6 years ago

I just ran a couple tests on wss://ropsten.infura.io/ws. It seems to be running fine. Are you getting dropped when actively using the websocket connection or when it's idle?

Plinpod commented 6 years ago

@JeeChoi It seems to be almost immediately as soon as I make a connection.

sanaterrae commented 6 years ago

@JeeChoi My Ropsten websocket wss://ropsten.infura.io/ws runs fine but appears to drop the connection when it goes idle for a period of time. Does Infura close connections after a period of time and any way to prevent this?

JeeChoi commented 6 years ago

@etherace You may be hitting the idle timeout on our load balancers. The timeout is already set to max (over 60 minutes). Hope this helps!

sanaterrae commented 6 years ago

@JeeChoi Okay that makes sense then. I may set up a system to 'ping' the websocket once every our to try and refute this! Thanks for your clarification.

voratham commented 6 years ago

I have the same problem in using web3js 1.0.0 beta 34 make a websocket connection 'wss://ropsten.infura.io/ws'

How to solve with a solution other?

screen shot 2561-06-19 at 14 43 30

import Web3 from "web3"; const provider = new Web3.providers.WebsocketProvider( "wss://ropsten.infura.io/ws" ); const web3Socket = new Web3(provider);

export default web3Socket;

ryanschneider commented 6 years ago

@voratham that's a different issue, it's a bug in recent web3js releases. See: https://github.com/ethereum/web3.js/issues/1559

FYJen commented 6 years ago

Has anyone successfully connected to ropsten's websocket? I have been trying but couldn't get connected. I am using web3.py

In [2]: from web3 import Web3

# I have also tried ``wss://ropsten.infura.io/ws``. Same result
In [3]: web3 = Web3(Web3.WebsocketProvider('wss://ropsten.infura.io/_ws'))

In [4]: new_transaction_filter = web3.eth.filter('pending')

# It hangs right here.

I was able to connect to rinkeby's and mainnet's but just not ropsten's. Could it be possible that the server ran out of the socket to connect with?

ec2 commented 6 years ago

@FYJen It's working for me. Please use wss://ropsten.infura.io/ws What kinda of error are you getting?

FYJen commented 6 years ago

@tueric: I am still analyzing the stacktrace. Following is when I ctl+c of the hanging process.

^C---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-3-60afc0d44840> in <module>()
----> 1 new_transaction_filter = web3.eth.filter('pending')

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/web3/eth.py in filter(self, filter_params, filter_id)
    319             elif filter_params == "pending":
    320                 filter_id = self.web3.manager.request_blocking(
--> 321                     "eth_newPendingTransactionFilter", [],
    322                 )
    323                 return TransactionFilter(self.web3, filter_id)

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/web3/manager.py in request_blocking(self, method, params)
    105         Make a synchronous request using the provider
    106         """
--> 107         response = self._make_request(method, params)
    108
    109         if "error" in response:

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/web3/manager.py in _make_request(self, method, params)
     88             self.logger.debug("Making request. Method: %s", method)
     89             try:
---> 90                 return request_func(method, params)
     91             except CannotHandleRequest:
     92                 continue

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/web3/middleware/gas_price_strategy.py in middleware(method, params)
     16                     transaction = assoc(transaction, 'gasPrice', generated_gas_price)
     17                     return make_request(method, [transaction])
---> 18         return make_request(method, params)
     19     return middleware

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/cytoolz/functoolz.pyx in cytoolz.functoolz.curry.__call__()

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/web3/middleware/formatting.py in apply_formatters(method, params, make_request, request_formatters, result_formatters, error_formatters)
     48         response = make_request(method, formatted_params)
     49     else:
---> 50         response = make_request(method, params)
     51
     52     if 'result' in response and method in result_formatters:

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/web3/middleware/attrdict.py in middleware(method, params)
     16     """
     17     def middleware(method, params):
---> 18         response = make_request(method, params)
     19
     20         if 'result' in response:

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/cytoolz/functoolz.pyx in cytoolz.functoolz.curry.__call__()

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/web3/middleware/formatting.py in apply_formatters(method, params, make_request, request_formatters, result_formatters, error_formatters)
     48         response = make_request(method, formatted_params)
     49     else:
---> 50         response = make_request(method, params)
     51
     52     if 'result' in response and method in result_formatters:

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/web3/middleware/normalize_errors.py in middleware(method, params)
      7 def normalize_errors_middleware(make_request, web3):
      8     def middleware(method, params):
----> 9         result = make_request(method, params)
     10
     11         # As of v1.8, Geth returns errors when you request a

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/cytoolz/functoolz.pyx in cytoolz.functoolz.curry.__call__()

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/web3/middleware/formatting.py in apply_formatters(method, params, make_request, request_formatters, result_formatters, error_formatters)
     48         response = make_request(method, formatted_params)
     49     else:
---> 50         response = make_request(method, params)
     51
     52     if 'result' in response and method in result_formatters:

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/cytoolz/functoolz.pyx in cytoolz.functoolz.curry.__call__()

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/web3/middleware/formatting.py in apply_formatters(method, params, make_request, request_formatters, result_formatters, error_formatters)
     48         response = make_request(method, formatted_params)
     49     else:
---> 50         response = make_request(method, params)
     51
     52     if 'result' in response and method in result_formatters:

~/pg/some_name/virtualenv_run/lib/python3.6/site-packages/web3/providers/websocket.py in make_request(self, method, params)
    102             WebsocketProvider._loop
    103         )
--> 104         return future.result()

/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/concurrent/futures/_base.py in result(self, timeout)
    425                 return self.__get_result()
    426
--> 427             self._condition.wait(timeout)
    428
    429             if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:

/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py in wait(self, timeout)
    293         try:    # restore state no matter what (e.g., KeyboardInterrupt)
    294             if timeout is None:
--> 295                 waiter.acquire()
    296                 gotit = True
    297             else:

KeyboardInterrupt: