Author

Topic: Error creating thread: boost::thread_resource_error (Read 1798 times)

legendary
Activity: 1974
Merit: 1029
From time to time I'm getting this in the bitcoind debug.log:

Code:
11/13/12 21:13:04 Error creating thread: boost::thread_resource_error
11/13/12 21:13:04 Failed to create RPC server client thread

I just learnt this seems to be a VPS limitation:

Code:
$ cat /proc/user_beancounters
Version: 2.5                       
       uid  resource                     held              maxheld              barrier                limit              failcnt
[...]
            numproc                       102                  103                  128                  128                  635

Nothing related to bitcoind. Sorry for the noise.
legendary
Activity: 1974
Merit: 1029
From time to time I'm getting this in the bitcoind debug.log:

Code:
11/13/12 21:13:04 Error creating thread: boost::thread_resource_error
11/13/12 21:13:04 Failed to create RPC server client thread

Accompanied by the corresponding:

Code:
$ bitcoind getbalance
-su: fork: Cannot allocate memory
$ ps
-su: fork: Cannot allocate memory

The problem appears at random (48 hours without any glitch vs several times a day), and goes away up to a couple of minutes after.

Code:
$ ps ax |wc -l
108
$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 138240
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 138240
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
$ free
             total       used       free     shared    buffers     cached
Mem:       4194304    1620460    2573844          0          0          0
-/+ buffers/cache:    1620460    2573844
Swap:            0          0          0

(This is a VPS, which explains the weird 'free' stats.)

Maybe relevant: I have a daemon which polls bitcoind every 10 seconds (over the same RPC connection, not opening a new one each time) to monitor new blocks. When a new block is found, a couple of additional commands are requested.

Has anyone else run into this?

Edit: BTW this is 0.7.0.
Jump to: