How do I increase my peer count?

motoaddictmotoaddict Fort Myers, FloridaMember Posts: 52
My peer count remains very low (currently at 1) and new blocks lag a bit compared to other nodes. Anything I can do about this?

I'm "Caloosahatchee" on the stats panel. geth 0.9.39.

Best Answer

Answers

  • roz303roz303 Member Posts: 66
    Have you tried manually adding nodes?
  • motoaddictmotoaddict Fort Myers, FloridaMember Posts: 52
    No. Did not have to do that with 0.9.36. Shouldn't the client be able to do that without intervention?
  • motoaddictmotoaddict Fort Myers, FloridaMember Posts: 52
    Looks better today.
  • tym4ttym4t Nagata-ku, Kobe-shi, Hyogo-ken, JapanMember Posts: 71 ✭✭✭
    If on Linux/UNIX check your max open file limit. Socket connections require a few of those and your geth process has to share with the leveldb reader/writer.
  • jakvesjakves Member Posts: 58
    Im running geth on windows 8.1

    > web3.net.peerCount
    2

    How can I increase the peer count?
  • tym4ttym4t Nagata-ku, Kobe-shi, Hyogo-ken, JapanMember Posts: 71 ✭✭✭
    Try restarting geth with
    --maxpeers "128"
  • jakvesjakves Member Posts: 58
    c:\Geth>geth -rpc --maxpeers "128" console 2>>geth.log
    instance: Geth/v1.0.0/windows/go1.4.2
    datadir: C:\Users\fly\AppData\Roaming\Ethereum
    coinbase: 0xa850c5af189e99871ec072b08fc5c91fd14fc2eb
    at block: 27991 (2015-08-03 18:27:03)
    modules: admin:1.0 db:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 shh:
    1.0 txpool:1.0 web3:1.0
    > web3.net.peerCount
    1
  • jakvesjakves Member Posts: 58
    edited August 2015
    Do I have to open a port, or something?

    I redownloaded the genesis block and flushed the roaming files. Then I set up a new geth account.

    Number of peers is growing very slowly
    > web3.net.peerCount
    1
    > web3.net.peerCount
    2
    > web3.net.peerCount
    2
    > web3.net.peerCount
    4

    Thanks

    edit:
    25 min later...

    > web3.net.peerCount
    10

    edit
    30 min later...
    and I've topped out

    > web3.net.peerCount
    11
    > web3.net.peerCount
    11
    > web3.net.peerCount
    8
    Post edited by jakves on
  • ottodvottodv NetherlandsMember Posts: 4
    I've tried using --maxpeers "25" with no success, so I tried opening port 30303:

    1. Set up the firewall on the server to open port 30303/tcp.
    2. Set up port forwarding on the router to the server.
    3. Tested that the port is indeed open (through an online port checking service)

    At first it remained at 12 peers, sometimes hitting 13, for over an hour, but after a restart of Geth it slowly climbed to 16 peers in some 30 minutes.
  • ottodvottodv NetherlandsMember Posts: 4
    It got to 25 a few hours later.
  • MrYukonCMrYukonC Member Posts: 627 ✭✭✭
    People really should stop using geth. It's rather 2nd rate compared to the cpp client, which I believe is the path forward.

    I run cpp-ethereum on linux and without changing anything, I always end up with 76-77 peers.
Sign In or Register to comment.