drakahn (OP)
|
|
July 25, 2012, 08:45:56 AM Last edit: August 10, 2012, 07:03:37 AM by drakahn |
|
Okay so I'm trying to make use of the PHP martingale bot that's bouncing around, and after a while the bitcoin client freezes and jsonRPC fails to connect (the client stays frozen and won't start until the whole computer is restarted) it doesn't seem to be connected to anything specific, just after a while (30 transactions on one wallet, 1800 on another) cpu use of the client hits 25% and it freezes
bitcoind freezes then crashes
I'm in windows 7 with the latest client from bitcoin.org
Anyone know how to stop this?
edit : it seems to happen when trying to use the rpc at the same time as bitcoin is downloading a block
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
drakahn (OP)
|
|
July 26, 2012, 05:52:21 AM |
|
I'll add a 1 bitcoin reward for information leading to a working php => bitcoin rpc setup in windows 7 for me
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
drakahn (OP)
|
|
July 26, 2012, 06:49:12 AM |
|
I have it all set up, but it freezes after a few transactions, thats the part i need working
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
drakahn (OP)
|
|
July 26, 2012, 07:27:21 AM |
|
bitcoind just crashes, bitcoin-qt freezes at 25% cpu use
Still freezes if i use sendmany
bitcoin uses under 100mb of ram at the point it freezes, over 3gb free
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
drakahn (OP)
|
|
July 26, 2012, 08:57:47 AM Last edit: July 26, 2012, 09:16:25 AM by drakahn |
|
This last run went for 60 rolls of the dice and then froze, it seems it freezes when bitcoin gets a new block at the same time as trying to send a transaction, and was actually using 150mb of ram, not under 100mb ... but still plenty free
is there a way to check for a block before trying to send a transaction?
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
drakahn (OP)
|
|
July 26, 2012, 03:05:27 PM |
|
This last run went for 60 rolls of the dice and then froze, it seems it freezes when bitcoin gets a new block at the same time as trying to send a transaction, and was actually using 150mb of ram, not under 100mb ... but still plenty free
is there a way to check for a block before trying to send a transaction?
what version did you try updating? i have 0.6.3 the latest on bitcoin.org, thats in the OP... I'm really not sure its tied to new blocks any more, it seems to just randomly freeze on an api call
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
scribe
|
|
July 29, 2012, 09:24:53 PM |
|
Not one I can test here, but some ideas to try: - Sounds like some kind of race condition or lock condition maybe, possibly caused by too many things trying to access the same resource. The jsonRPCClient code doesn't seem to close it's stream neatly, but don't know if that would matter. You could try adding "fclose($fp);" inside jsonRPCClient.php, after the line "$response = json_decode($response,true);"
- More extreme version of the above: Can you edit the script to destroy the jsonRPCClient object and construct a new one each loop? Might help to totally reset any open connections.
- Can you isolate which RPC call is causing it by commenting out the sendtoaddress line? It might be the effect of many RPC calls, or one specific one.
- Are you running the right bitcoind version for your PC, i.e. 32-bit vs 64-bit? Any improvement if you "downgrade" to 32-bit if you're running 64-bit?
- Alternatively, is your PHP version up to date?
- 25% is a weird number - are you running a quad core and maybe the bitcoind hits a CPU limit in one core?
|
|
|
|
drakahn (OP)
|
|
July 30, 2012, 05:00:39 AM |
|
It seems any RPC call (ATM machine... damnit) that tries while bitcoin is frozen fails (nothing to connect to) not too sure it has anything to do with the blocks now, it freezes in between them too I am on a quad core, PHP is up to date and Is there a 64 bit windows version? - Sounds like some kind of race condition or lock condition maybe, possibly caused by too many things trying to access the same resource. The jsonRPCClient code doesn't seem to close it's stream neatly, but don't know if that would matter. You could try adding "fclose($fp);" inside jsonRPCClient.php, after the line "$response = json_decode($response,true);"
- More extreme version of the above: Can you edit the script to destroy the jsonRPCClient object and construct a new one each loop? Might help to totally reset any open connections.
I've pregenerated a few million keys in the keypool and its been running, when it freezes again I will try these....
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
drakahn (OP)
|
|
July 30, 2012, 05:18:22 AM |
|
It seems any RPC call (ATM machine... damnit) that tries while bitcoin is frozen fails (nothing to connect to) not too sure it has anything to do with the blocks now, it freezes in between them too I am on a quad core, PHP is up to date and Is there a 64 bit windows version? - Sounds like some kind of race condition or lock condition maybe, possibly caused by too many things trying to access the same resource. The jsonRPCClient code doesn't seem to close it's stream neatly, but don't know if that would matter. You could try adding "fclose($fp);" inside jsonRPCClient.php, after the line "$response = json_decode($response,true);"
- More extreme version of the above: Can you edit the script to destroy the jsonRPCClient object and construct a new one each loop? Might help to totally reset any open connections.
I've pregenerated a few million keys in the keypool and its been running, when it freezes again I will try these.... there is your answer a few million keys in the keypool, is alot, i think a good number is 10,000 should be good ... I'm not sure you are following along... I generated the millions of keys to try and stop it from freezing, the keypool is back on default now but i have millions of keys, so one less thing for the client to do that could cause a freeze by locking out rpc, until i've used up the keys, but that should be a few days at least, and then i can try the suggestions from scribe and hope for the best other things i have done that haven't worked -Increased BdB cache to 1gb -Increased/decreased number of connections -A 30 second delay between RPC's
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
NRF
|
|
July 30, 2012, 05:20:39 AM |
|
Try this;-
1. Shut everything down.
2. Disable your firewall.
3. Disable your Virus protection.
4. Go to User Account Control Settings and set it all the way to the bottom
5. Reboot (making sure that none of the above start automatically)
6. Start Bitcoind as administrator (right click on the Icon and "Run as administrator")
7. Start your process that invokes the PHP script (right click on the Icon and "Run as administrator")
8. See if it is fixed!!!
At that point, if it is not fixed restart all of the above and reboot. If it is fixed work backwards up the list until it is broken again, then yell "Aha, that's the problem". ;P
|
|
|
|
drakahn (OP)
|
|
July 30, 2012, 09:35:12 AM |
|
Nothing I've tried so far has fixed it, after scribes suggestion still resulted in the client freezing I tried a python version, it seemed to freeze quicker than php, however does seem to follow the rpc timeout rules so is still going, just very slowly instead of dying
I've tried the php version on two computers (both win7 64) and the python on one, i guess next step is trying either linux (not really the best option but i could make it work) or go through old versions of the client until one doesn't freeze (or crash)
unless there is something else I could try
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
NRF
|
|
July 30, 2012, 10:38:24 AM |
|
Odd,
Assuming you did the shut off everything thing I suggested the next thing I would do is download the blockchain from scratch and a new wallet.
I use jsonRPCClient and jsonRPCServer classes alot and have never experienced the same issues.
|
|
|
|
drakahn (OP)
|
|
July 30, 2012, 11:15:12 AM |
|
Odd,
Assuming you did the shut off everything thing I suggested the next thing I would do is download the blockchain from scratch and a new wallet.
I use jsonRPCClient and jsonRPCServer classes alot and have never experienced the same issues.
I've tried on a couple of computers, both as administrator, with and without firewalls, nothing else running, fresh install, blockchain and wallet a few times on each do you use 0.6.3 ?
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
scribe
|
|
July 30, 2012, 11:18:38 AM |
|
Did you try it with the "sendtoaddress" line of code commented out? Trying to work out if it's the RPC calls generally or creating the transactions that causes the problem...
|
|
|
|
drakahn (OP)
|
|
July 30, 2012, 12:52:07 PM |
|
Did you try it with the "sendtoaddress" line of code commented out? Trying to work out if it's the RPC calls generally or creating the transactions that causes the problem...
with that part commented out (i use sendmany, but same thing) it doesn't do anything but check the balance over and over and i haven't left it long enough to freeze, however it does freeze on checking balance half of the time when running normally, not just creating a transaction, and it does seem to "build up" (but calm down for a couple of minutes if a block comes in) Is there a limit to the number of unconfirmed transactions? perhaps the amount of unconfirmed sent and received transactions are causing this? I've only had one last overnight (1800 transactions, the first one) all the others after that (new wallets and blockchains) freeze between 30 and 200 transactions
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
drakahn (OP)
|
|
August 01, 2012, 03:47:16 AM |
|
okay so i want to use sendmany to be able to control where the return tx get sent to, but it freezes fast using sendmany changing back to sendtoaddress it lasts about 8 hours (1200 transactions this last time) but pays out a lot in fee's then freezes leaving me with all the losses all over the place http://blockchain.info/tx-index/14167011/3c4ce78154144dcc3b420ec1f86bbf0944ea171dac8e6b35261e6485e51ff14cto organise, and often when organising the client throws "Failed to create transaction" which i suspect is related to the bot failing at least it died while it was ahead this time.
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
ErebusBat
|
|
August 08, 2012, 05:27:13 PM |
|
Did you get this solveD?
|
|
|
|
drakahn (OP)
|
|
August 08, 2012, 05:37:37 PM |
|
Yes, the the satoshi dice thread https://bitcointalk.org/index.php?topic=77870.msg1086135#msg1086135Dooglus suggested a change in the clients source and after all else failed i built that (took me hours to make bitcoin build in windows) and it seems the problem is solved, if it ignores the single satoshi's it doesn't freeze (well hasn't in the last 24 hours at least) Just waiting on his bitcoin address
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
|
August 08, 2012, 06:16:42 PM |
|
Yes, the the satoshi dice thread https://bitcointalk.org/index.php?topic=77870.msg1086135#msg1086135Dooglus suggested a change in the clients source and after all else failed i built that (took me hours to make bitcoin build in windows) and it seems the problem is solved, if it ignores the single satoshi's it doesn't freeze (well hasn't in the last 24 hours at least) Just waiting on his bitcoin address I PM'ed drakahn my address after reading the other thread, then caught up on this thread. I guess I may as well post the contents of the PM here: Hi. I'm glad my little change worked for you. My address is: 1Up2upZ1xo4tBoq86GLYywwRmshzJc7tA I hadn't seen your thread offering the bounty, but would have been interested to look into the problem. Do you have a wallet which still causes the hangups and crashes but which is empty enough to share with me? I'd like to be able to reproduce the problem without having to make thousands of SatoshiDice bets to get there...
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
scribe
|
|
August 08, 2012, 06:25:34 PM |
|
Great to see you got a solve/workaround, would never have found that :-)
|
|
|
|
|