Failed to allocate memory while I use multi-threads

Dear all
I got a error message while I was running a multi-threads program.

OS is WINDOWS 2003,
Ram is 4G.
ruby:1.92 p290

the program is:

scheduler = Rufus::Scheduler.start_new
check_process_job = scheduler.every ‘30m’ do |job|

threads =
thread= [check_process_queue] unless
check_process_queue.each{ |line|
threads.add{ |l|
unless check_process_queue.size<1
do …

the number of line is less than 500.

any help would be great appreciated!