# Retry-After returns with 0 seconds

**URL:** <https://meta.discourse.org/t/retry-after-returns-with-0-seconds/99550>\
**Category:** Bug\
**Created:** [October 15, 2018, 2:35pm UTC](https://meta.discourse.org/t/retry-after-returns-with-0-seconds/99550 "2018-10-15T14:35:37Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![andrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrei/32/205142_2.png) [@andrei](https://meta.discourse.org/u/andrei)\
**Post date:** [January 12, 2021, 4:52pm UTC](https://meta.discourse.org/t/retry-after-returns-with-0-seconds/99550/5 "2021-01-12T16:52:18Z")

</div>

It turned out that it wasn’t a problem with rounding in Lua script. Lua script gets already rounded values.

Moreover, it’s not a problem with rounding at all. Unrounded seconds might be used, and it would be possible to receive a 429 response with `Retry-After: 0` anyway.

Here is the fix for the main problem:  
[https://github.com/discourse/discourse/pull/11691](https://github.com/discourse/discourse/pull/11691)

And here is the fix for an additional problem that can occasionally cause the same error:  
[https://github.com/discourse/discourse/pull/11692](https://github.com/discourse/discourse/pull/11692)

---

_[View the full topic](https://meta.discourse.org/t/retry-after-returns-with-0-seconds/99550)._
