Author

Topic: [Solved] Bitcoin-Qt maxconnections ignored (Read 113 times)

legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
February 11, 2024, 09:17:56 AM
#10
If you still use term Bitcoin-Qt (these days it's called Bitcoin Core), -snip-
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.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
February 11, 2024, 08:31:27 AM
#9
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/
legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
February 10, 2024, 04:07:34 AM
#8
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.
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.
jr. member
Activity: 45
Merit: 22
February 09, 2024, 09:24:16 PM
#7
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.





staff
Activity: 3374
Merit: 6530
Just writing some code
February 09, 2024, 05:37:53 PM
#6
What bitcoin-qt.conf? Bitcoin Core does not have such a file for people to write configuration options to.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
February 09, 2024, 05:24:32 PM
#5
I have maxconnections=20 set in the bitcoin-qt.conf file but it seems to ignore the setting.
Have you tried disabling incoming connections temporarily and see how many connections you'll have? The default option is to accept 11 outgoing max.

When i run it as bitcoind, instead of using bitcoin-qt, the maxconnections works fine, but that is in a different config file.
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.
legendary
Activity: 3248
Merit: 2971
Block halving is coming.
February 09, 2024, 04:37:32 PM
#4
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.

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.
jr. member
Activity: 45
Merit: 22
February 09, 2024, 03:15:38 PM
#3
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.
legendary
Activity: 3248
Merit: 2971
Block halving is coming.
February 09, 2024, 12:16:32 PM
#2
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
jr. member
Activity: 45
Merit: 22
February 09, 2024, 09:54:41 AM
#1
I have maxconnections=20 set in the bitcoin-qt.conf file but it seems to ignore the setting.  right now network connections at 48 inbound and 10 outbound.

When i run it as bitcoind, instead of using bitcoin-qt, the maxconnections works fine, but that is in a different config file.



Jump to: