ileitch/rapns — Issue #36: Pipe: Too many open files (err)
Author: lothcor
Created: 2012-01-31 01:02:08+00:00
State: open

Getting error while running after about 5 minutes.
If I remove the @_sleep_check and IO.select lines in interuptiblesleep.rb the daemon keeps working but connects to the feedback service every second or so and uses a lot more resources of the machine its running on.

```
[2012-01-31 11:51:09] [DeliveryHandler 0] Connected to gateway.sandbox.push.apple.com:2195
[2012-01-31 11:51:10] [DeliveryHandler 1] Connected to gateway.sandbox.push.apple.com:2195
[2012-01-31 11:51:11] [DeliveryHandler 2] Connected to gateway.sandbox.push.apple.com:2195
[2012-01-31 11:51:11] Ready
[2012-01-31 11:51:13] [FeedbackReceiver] Connected to feedback.sandbox.push.apple.com:2196
[2012-01-31 11:52:14] [FeedbackReceiver] Connected to feedback.sandbox.push.apple.com:2196
[2012-01-31 11:53:14] [FeedbackReceiver] Connected to feedback.sandbox.push.apple.com:2196
[2012-01-31 11:54:16] [FeedbackReceiver] Connected to feedback.sandbox.push.apple.com:2196
[2012-01-31 11:55:18] [FeedbackReceiver] Connected to feedback.sandbox.push.apple.com:2196
/Library/Ruby/Gems/1.8/gems/rapns-1.0.3/lib/rapns/daemon/interruptible_sleep.rb:5:in `pipe': Too many open files (Errno::EMFILE)
from /Library/Ruby/Gems/1.8/gems/rapns-1.0.3/lib/rapns/daemon/interruptible_sleep.rb:5:in `interruptible_sleep'
from /Library/Ruby/Gems/1.8/gems/rapns-1.0.3/lib/rapns/daemon/feeder.rb:17:in `start'
from /Library/Ruby/Gems/1.8/gems/rapns-1.0.3/lib/rapns/daemon/feeder.rb:14:in `loop'
from /Library/Ruby/Gems/1.8/gems/rapns-1.0.3/lib/rapns/daemon/feeder.rb:14:in `start'
from /Library/Ruby/Gems/1.8/gems/rapns-1.0.3/lib/rapns/daemon.rb:52:in `start'
from /Library/Ruby/Gems/1.8/gems/rapns-1.0.3/bin/rapns:28
from /Library/Ruby/Gems/1.8/bin/rapns:19:in `load'
from /Library/Ruby/Gems/1.8/bin/rapns:19

```