Bitcoin-Qt isn't respecting maxconnections setting

9 replies 113 views
Posts: 3 · Reputation: 80
#1Feb 5, 2019, 05:32 AM
So I've got maxconnections=20 in my bitcoin-qt.conf, but it looks like that setting doesn't do anything. I'm sitting at 48 inbound and 10 outbound connections right now. However, when I run it as bitcoind instead of bitcoin-qt, the maxconnections setting works just fine, but that's in a different config file.
5 Reply Quote Share
coldsageFull Member
Posts: 67 · Reputation: 458
#2Feb 5, 2019, 09:55 AM
Did you try to shut down the Bitcoin and restart it? try it first and test it again. Would you mind telling us what exactly do you plan for why you want to change maxconnections to 20? According to them, it's not a healthy network if you change this. Check this guide here https://github.com/bitcoin/bitcoin/blob/master/doc/reduce-traffic.md
3 Reply Quote Share
Posts: 3 · Reputation: 80
#3Feb 7, 2019, 06:05 AM
yes i've shutdown and restarted  but it is still ignoring the max setting. and i just dont want over a 100 people accessing my network.
4 Reply Quote Share
coldsageFull Member
Posts: 67 · Reputation: 458
#4Feb 7, 2019, 12:05 PM
I don't know how this thing works but if you don't want more people to connect to your node then try to play the value of maxconnection I suggest 12 or lower and let's see for the changes on the inbound peers. Also, play with the maxuploadtarget= according to the link I posted above. Or try this tool https://jlopp.github.io/bitcoin-core-config-generator/ you can copy their predefined config and paste it into your bitcoin.conf file you can choose between low bandwidth or privacy under a predefined config let see any changes in your inbound and outbound peers.
4 Reply Quote Share
sigma2018Member
Posts: 15 · Reputation: 172
#5Feb 9, 2019, 02:05 PM
Have you tried disabling incoming connections temporarily and see how many connections you'll have? The default option is to accept 11 outgoing max. What do you mean? How can you have more than one configuration file? Both Bitcoin-QT and bitcoind, if run with no datadir and conf parameters, read from the default data directory, where there's bitcoin.conf.
4 Reply Quote Share
byte_f4rmMember
Posts: 10 · Reputation: 172
#6Feb 9, 2019, 08:15 PM
What bitcoin-qt.conf? Bitcoin Core does not have such a file for people to write configuration options to.
2 Reply Quote Share
Posts: 3 · Reputation: 80
#7Feb 11, 2019, 07:51 PM
I've been running Bitcoin Core using bitcoind -daemon for the last few years. I have it running on my RaspberryPi and yes it uses the config file at ~/.bitcoin. I have the maxconnections set here to 30.  Bitcoind always adhered to the maxconnections setting. Just this week I decided to use bitcoin-qt (for the first time in a while) to teach someone about Bitcoin.  So I shutdown bitcoind and started bitcoin-qt.  Bitcoin-Qt always created a config file at ~/.config/Bitcoin/Bitcoin-Qt.conf.  When I noticed the number of connections going higher than I set it, I thought I needed to add a maxconnections setting to that bitcoin-qt.conf file. But I am realizing now that the bitcoin-qt.conf isn't the place to manually add settings.   I guess it contains changes settings strictly made in the GUI.  I decided to delete the current bitcoin-qt.conf file and restarted bitcoin-qt. It regenerated that bitcoin-qt.conf file and then somehow magically now it is adhering to the original maxconnections setting.  Maybe the file was corrupt or something(?) Anyway thanks for feedback, it helped me get back on track.
1 Reply Quote Share
Posts: 54 · Reputation: 222
#8Feb 12, 2019, 12:04 AM
The possible scenario is you've set the custom data directory using the GUI's welcome screen that was saved in that qt config file. In that case, Bitcoin-qt had been using the "bitcoin.conf" saved in that custom data directory instead of the one at ~/.bitcoin. The reason why it's not adhering to the maxconnections setting that you've been using in bitcoind. Continuing from the above, after deleting the file, you've essentially deleted the custom datadir set by the GUI and made Bitcoin-qt use the "bitcoin.conf" at ~/.bitcoin. That worked seamlessly because you must have set the same custom directory in that bitcoin.conf file.
5 Reply Quote Share
madrocketFull Member
Posts: 53 · Reputation: 394
#9Feb 12, 2019, 05:03 AM
If you still use term Bitcoin-Qt (these days it's called Bitcoin Core), i'm also worried that you use very outdated software which have slower performance[1] with possible bug/security issue. [1] https://blog.lopp.net/bitcoin-core-performance-evolution/
4 Reply Quote Share
Posts: 54 · Reputation: 222
#10Feb 13, 2019, 04:52 AM
When a user mentioned "Bitcoin-qt" he's talking about the GUI, not the software name per se. If you have Bitcoin Core installed, you're actually using the executables 'bitcoin-qt' to launch Bitcoin Core with GUI or 'bitcoind' to run in the command line.
1 Reply Quote Share

Related topics