-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added some new FIAT currencies and enabled auto price update (Default value 300K ms) #469
Conversation
this should be thoroughly tested. when it was enabled before it caused the wallet to eventually lose network connections after long periods of use because the sockets descriptors were not correctly released after each request |
Is that a QT related issue? I'll see if I can change it to release the connections Cause the network calls are using the QT libs |
I'll compile a version that updates prices every second, and see if it looses connection after a few days. |
id say deletelater() should release them, but we were seeing that side effect before |
Possibly a bug with the QT 5.7.1 libs? I'll build against both 5.7.1 and 5.9.8 and see if the issue is fixed. |
Looks like I got it to happen, is this the issue? :
node crashes/closes after the Which I think comes from here: |
Seems this was not actually related to the current issue |
I was able to replicate the issue by setting up a localhost http server to serve the JSON file And updated the price check interval to 100ms Node built with QT 5.7.1 fails in about 10 secs Node built with QT 5.9.8 failes in about 16 minutes both with same error:
|
So I think this behavior should be normal. My guess is since I was testing with 100ms interval, the QT code that would handle deleteLater() could not keep up with the new requests So in a more realistic setting were lets say the interval is 5 minutes, this should not be an issue. @aguycalled @craigmacgregor do you agree? |
I think this PR is ready for review 😄 |
Has it been confirmed through testing the issue won't happen in a real world scenario with a higher interval, or is it assumed? We saw the issue before with a similar interval. |
It's assumed as of now (I can't time travel, sorry) I'll still running the node with the 5 minute interval and will leave it running for a few days to confirm that it does not lose a connection / crash But I'm almost 💯 % certain that the issue was fixed by moving this line outside the try catch: reply->deleteLater(); With the old code, it was using QT's Json classes, but I noticed this would hang sometimes (And if it hangs, it would not call the And over time this would create more and more hung threads (Which I assume still have atleast 1 open files each) Which after X amount of time (Depending on the OS limits set) the wallet would run out of allowed open files |
I've done additional testing and found that the wallet indeed does not release the socket files in I'll try to replace the HTTP request code with libcurl instead of using QT5's classes and see if it solves the issue Sample filesi n
The HTTP request seem to be the files with |
@aguycalled @craigmacgregor latest commit in this PR replaces QT's network manager with a plain old I can confirm that this implementation was properly releasing the sockets after request was done. |
utACK |
@aguycalled I've had a node running these changes for a week, seems to be working and not holding the sockets. |
@aguycalled The currencies list is getting kinda bloated, maybe I should replace those menu's with a searchable dropdown? Show top 5, then have a search bar? |
ACK |
Had a node running for 24h+ on Debian |
I'm adding the GUI change for the coin list ( then you guys can review ) |
|
Rebased the branch from master |
@aguycalled I wanna change my bounty address to |
Rebased from master |
building now. |
@aguycalled you missed a bounty 🤣 |
Paid a07b6e5541ee6c9a249fb59020d573d56bc0a8de26ee853dfde823df68673b79 |
Added some new FIAT currencies to the QT wallet.