# Polling seems to have died after message

**URL:** <https://meta.discourse.org/t/polling-seems-to-have-died-after-message/90104>\
**Category:** Support\
**Created:** [June 18, 2018, 10:03am UTC](https://meta.discourse.org/t/polling-seems-to-have-died-after-message/90104 "2018-06-18T10:03:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlokok](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/carlokok/32/115951_2.png) [@carlokok](https://meta.discourse.org/u/carlokok)\
**Post date:** [June 18, 2018, 10:03am UTC](https://meta.discourse.org/t/polling-seems-to-have-died-after-message/90104/1 "2018-06-18T10:03:29Z")

</div>

I get this exception, after which polling stops:

Job exception: can’t modify frozen String

```plaintext
/usr/local/lib/ruby/2.5.0/net/pop.rb:808:in `block in pop'
/usr/local/lib/ruby/2.5.0/net/protocol.rb:276:in `each_message_chunk'
/usr/local/lib/ruby/2.5.0/net/pop.rb:955:in `block in retr'
/usr/local/lib/ruby/2.5.0/net/pop.rb:1013:in `critical'
/usr/local/lib/ruby/2.5.0/net/pop.rb:953:in `retr'
/usr/local/lib/ruby/2.5.0/net/pop.rb:807:in `pop'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:25:in `process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:43:in `block (2 levels) in poll_pop3'
/usr/local/lib/ruby/2.5.0/net/pop.rb:689:in `block in delete_all'
/usr/local/lib/ruby/2.5.0/net/pop.rb:688:in `each'
/usr/local/lib/ruby/2.5.0/net/pop.rb:688:in `delete_all'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:42:in `block in poll_pop3'
/usr/local/lib/ruby/2.5.0/net/pop.rb:532:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:41:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:16:in `execute'
/var/www/discourse/app/jobs/base.rb:134:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.4/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/app/jobs/base.rb:129:in `block in perform'
/var/www/discourse/app/jobs/base.rb:125:in `each'
/var/www/discourse/app/jobs/base.rb:125:in `perform'
/var/www/discourse/app/jobs/base.rb:180:in `perform'
/var/www/discourse/lib/scheduler/manager.rb:91:in `process_queue'
/var/www/discourse/lib/scheduler/manager.rb:37:in `block in initialize'

```

I have the mail but can’t post it publically (private is fine).

---

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [June 18, 2018, 10:50am UTC](https://meta.discourse.org/t/polling-seems-to-have-died-after-message/90104/2 "2018-06-18T10:50:21Z")

</div>

Seems to be a bug in Ruby 2.5: [Bug #14416: Net::POPMail methods modify frozen literal when using default arg - Ruby - Ruby Issue Tracking System](https://bugs.ruby-lang.org/issues/14416)

---

<div class="post-metadata">

**Author:** ![carlokok](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/carlokok/32/115951_2.png) [@carlokok](https://meta.discourse.org/u/carlokok)\
**Post date:** [June 18, 2018, 3:59pm UTC](https://meta.discourse.org/t/polling-seems-to-have-died-after-message/90104/3 "2018-06-18T15:59:28Z")

</div>

Hrmm. Must have broken when I rebuild the image this morning then.

Seems to happen with all mail now.

---

<div class="post-metadata">

**Author:** ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)\
**Post date:** [June 19, 2018, 1:48am UTC](https://meta.discourse.org/t/polling-seems-to-have-died-after-message/90104/4 "2018-06-19T01:48:17Z")

</div>

I’ve monkey patched in the fix for now. Will remove when we upgrade to Ruby 2.5.2.

[https://github.com/discourse/discourse/commit/6e97242bb9463566079883eb3fa917d17fb5961b](https://github.com/discourse/discourse/commit/6e97242bb9463566079883eb3fa917d17fb5961b)

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [July 19, 2018, 1:48am UTC](https://meta.discourse.org/t/polling-seems-to-have-died-after-message/90104/7 "2018-07-19T01:48:28Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
