Pages:
Author

Topic: [solved/paid][1btc reward] PHP RPC commands freezing bitcoin - page 2. (Read 4319 times)

hero member
Activity: 504
Merit: 500
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
sr. member
Activity: 295
Merit: 250
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...
hero member
Activity: 504
Merit: 500
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 ?
NRF
sr. member
Activity: 279
Merit: 250
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.
hero member
Activity: 504
Merit: 500
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
NRF
sr. member
Activity: 279
Merit: 250
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
hero member
Activity: 504
Merit: 500
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
hero member
Activity: 504
Merit: 500
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....
sr. member
Activity: 295
Merit: 250
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?
hero member
Activity: 504
Merit: 500
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
hero member
Activity: 504
Merit: 500
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?
hero member
Activity: 504
Merit: 500
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

hero member
Activity: 504
Merit: 500
I have it all set up, but it freezes after a few transactions, thats the part i need working
hero member
Activity: 504
Merit: 500
I'll add a 1 bitcoin reward for information leading to a working php => bitcoin rpc setup in windows 7 for me
hero member
Activity: 504
Merit: 500
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
Pages:
Jump to: