# La reconstrucción siempre falla cuando se agota el límite diario de MAXMIND

**URL:** <https://meta.discourse.org/t/rebuilding-always-fails-when-the-maxmind-daily-limit-is-exhausted/312775>\
**Category:** Bug\
**Tags:** maxmind, dev-ops, fixed\
**Created:** [19 Junio, 2024 15:13 UTC](https://meta.discourse.org/t/rebuilding-always-fails-when-the-maxmind-daily-limit-is-exhausted/312775 "2024-06-19T15:13:54Z")\
**Posts on this page:** 1\
**Showing post:** 63

<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:** [31 Julio, 2024 00:10 UTC](https://meta.discourse.org/t/rebuilding-always-fails-when-the-maxmind-daily-limit-is-exhausted/312775/63 "2024-07-31T00:10:47Z")

</div>

> [@pfaffman](#):
>
> ¿Quizás sea algo que ocurre en la precompilación antes?

Me acabo de dar cuenta de que descargamos las bases de datos de Maxmind en un hilo secundario mientras ejecutamos `assets:precompile` al mismo tiempo. Basándome en los rastreos inversos que estoy viendo, tengo la hipótesis de que el hilo secundario que usamos para descargar la base de datos de Maxmind está interfiriendo de alguna manera con `assets:precompile`.

> <https://github.com/discourse/discourse/pull/28157>
>
> We have been seeing \`ZLib::BufError\` when running the \`assets:precompile\` rake
> …task.
> 
> \`\`\`
> I, \[2024-07-30T05:19:58.807019 #1059\] INFO -- : Writing /var/www/discourse/public/assets/scripts/discourse-test-listen-boot-9b14a0fc65c689577e6a428dcfd680205516fe211700a71c7adb5cbcf4df2cc5.js
> rake aborted!
> Zlib::BufError: buffer error (Zlib::BufError)
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sprockets-3.7.3/lib/sprockets/cache/file\_store.rb:100:in \`\<\<'
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sprockets-3.7.3/lib/sprockets/cache/file\_store.rb:100:in \`set'
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sprockets-3.7.3/lib/sprockets/cache.rb:212:in \`set'
> \`\`\`
> 
> The hypothesis here is that some thread unsafe issue is causing the
> problem since we download the Maxmind databases in a thread and run
> decompression operations once the gzip file is downloaded.
> 
> In the near term, we plan to move downloading of Maxmind databases out
> of the Rake task into a scheduled job so this patch should be considered
> a temporary solution.
> 
> The trade-off here is that build time will slightly increase since we
> are not longer downloading Maxmind databases while precompiling assets
> at the same time.

Primero enviaré la corrección anterior y no profundizaré demasiado en la causa raíz, ya que vamos a sacar la descarga de las bases de datos de Maxmind del proceso de compilación.

---

_[View the full topic](https://meta.discourse.org/t/rebuilding-always-fails-when-the-maxmind-daily-limit-is-exhausted/312775)._
