You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RAILS_ENV=production bundle exec rails assets:precompile <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in require': /lib/x86_64-linux-gnu/libjemalloc.so.2: cannot allocate memory in static TLS block - /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/msgpack-1.7.1/lib/msgpack/msgpack.so (LoadError)
from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in require' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/msgpack-1.7.1/lib/msgpack.rb:7:in <top (required)>'
from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in require' from <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in require'
from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/store.rb:5:in block in <top (required)>' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/explicit_require.rb:45:in rescue in with_gems'
from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/explicit_require.rb:41:in with_gems' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/store.rb:5:in <top (required)>'
from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache.rb:68:in require_relative' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache.rb:68:in <top (required)>'
from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap.rb:5:in require_relative' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap.rb:5:in <top (required)>'
from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in require_relative' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in <top (required)>'
from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in require' from <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in require'
from /home/mastodon/live/config/boot.rb:11:in <top (required)>' from bin/rails:3:in require_relative'
from bin/rails:3:in <main>' <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in require': /lib/x86_64-linux-gnu/libjemalloc.so.2: cannot allocate memory in static TLS block - /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/msgpack-1.7.1/lib/msgpack/msgpack.so (LoadError)
from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in require' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/msgpack-1.7.1/lib/msgpack.rb:7:in <top (required)>'
from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in require' from <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in require'
from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/store.rb:5:in block in <top (required)>' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/explicit_require.rb:42:in with_gems'
from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/store.rb:5:in <top (required)>' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache.rb:68:in require_relative'
from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache.rb:68:in <top (required)>' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap.rb:5:in require_relative'
from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap.rb:5:in <top (required)>' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in require_relative'
from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in <top (required)>' from <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in require'
from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in require' from /home/mastodon/live/config/boot.rb:11:in <top (required)>'
from bin/rails:3:in require_relative' from bin/rails:3:in
'`
and ask gtp ;):
`Das Problem, das du erlebst, ist mit der Bibliothek libjemalloc.so, einem Speicherverwaltungstool, das oft zur Leistungssteigerung in Ruby-Anwendungen verwendet wird. Der Fehler „cannot allocate memory in static TLS block“ kann auf eine unzureichende statische TLS (Thread Local Storage) Allocation hinweisen, die durch die Bibliothekseinstellungen oder die Systemkonfiguration verursacht wird.
Hier sind einige Schritte, die du versuchen kannst, um das Problem zu lösen:
Setze die Umgebungsvariable LD_PRELOAD: Manchmal kann das Vorladen der libjemalloc Bibliothek das Problem beheben. Du kannst dies tun, indem du die folgende Umgebungsvariable vor dem Starten deiner Rails-Anwendung setzt:
bash
Aktualisiere oder rekonfiguriere jemalloc: Stelle sicher, dass du die neueste Version von jemalloc installiert hast, oder versuche, eine ältere oder stabilere Version zu verwenden, die möglicherweise besser mit deiner Ruby-Version kompatibel ist.
Reduziere den Speicherverbrauch: Es kann hilfreich sein, andere Teile deiner Anwendung oder des Servers zu optimieren, um den Gesamtspeicherverbrauch zu reduzieren, was den Druck auf jemalloc verringern kann.
Prüfe die Systemlimits: Manchmal können Systemlimits wie ulimit die Anwendung beeinträchtigen. Prüfe die Limits und erhöhe sie gegebenenfalls:
bash
ulimit -n 4096
Kompiliere Ruby neu mit anderem Allocator: Wenn das Problem weiterhin besteht, könntest du in Betracht ziehen, Ruby ohne jemalloc neu zu kompilieren, um Konflikte zu vermeiden.
Logs und Konfigurationen prüfen: Überprüfe die Logs und Konfigurationen deines Systems und deiner Anwendung auf weitere Hinweise, was das Problem verursachen könnte und ob andere Abhängigkeiten oder Bibliotheken ähnliche Probleme verursachen.
Wenn diese Schritte das Problem nicht lösen, könnte es nützlich sein, mehr Informationen über die Konfiguration deines Servers und Details über die Installation und Konfiguration deiner Mastodon-Instanz zu haben. Manchmal kann das Problem spezifischer sein als es auf den ersten Blick erscheint.`
:~/live$ RAILS_ENV=production bin/tootctl settings registrations open
and get the same error. So i have to do export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 aggain and after that i can open the registration.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I got following by compiling v4.2.8:
'`RAILS_ENV=production bundle exec rails assets:precompile <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in
require': /lib/x86_64-linux-gnu/libjemalloc.so.2: cannot allocate memory in static TLS block - /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/msgpack-1.7.1/lib/msgpack/msgpack.so (LoadError)from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in
require' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/msgpack-1.7.1/lib/msgpack.rb:7:in
<top (required)>'from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in
require' from <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in
require'from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/store.rb:5:in
block in <top (required)>' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/explicit_require.rb:45:in
rescue in with_gems'from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/explicit_require.rb:41:in
with_gems' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/store.rb:5:in
<top (required)>'from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache.rb:68:in
require_relative' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache.rb:68:in
<top (required)>'from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap.rb:5:in
require_relative' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap.rb:5:in
<top (required)>'from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in
require_relative' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in
<top (required)>'from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in
require' from <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in
require'from /home/mastodon/live/config/boot.rb:11:in
<top (required)>' from bin/rails:3:in
require_relative'from bin/rails:3:in
<main>' <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in
require': /lib/x86_64-linux-gnu/libjemalloc.so.2: cannot allocate memory in static TLS block - /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/msgpack-1.7.1/lib/msgpack/msgpack.so (LoadError)from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in
require' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/msgpack-1.7.1/lib/msgpack.rb:7:in
<top (required)>'from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in
require' from <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in
require'from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/store.rb:5:in
block in <top (required)>' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/explicit_require.rb:42:in
with_gems'from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/store.rb:5:in
<top (required)>' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache.rb:68:in
require_relative'from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache.rb:68:in
<top (required)>' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap.rb:5:in
require_relative'from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap.rb:5:in
<top (required)>' from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in
require_relative'from /home/mastodon/live/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in
<top (required)>' from <internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in
require'from internal:/home/mastodon/.rbenv/versions/3.2.3/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in
require' from /home/mastodon/live/config/boot.rb:11:in
<top (required)>'from bin/rails:3:in
require_relative' from bin/rails:3:in
and ask gtp ;):
`Das Problem, das du erlebst, ist mit der Bibliothek libjemalloc.so, einem Speicherverwaltungstool, das oft zur Leistungssteigerung in Ruby-Anwendungen verwendet wird. Der Fehler „cannot allocate memory in static TLS block“ kann auf eine unzureichende statische TLS (Thread Local Storage) Allocation hinweisen, die durch die Bibliothekseinstellungen oder die Systemkonfiguration verursacht wird.
Hier sind einige Schritte, die du versuchen kannst, um das Problem zu lösen:
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
RAILS_ENV=production bundle exec rails assets:precompile
Aktualisiere oder rekonfiguriere jemalloc: Stelle sicher, dass du die neueste Version von jemalloc installiert hast, oder versuche, eine ältere oder stabilere Version zu verwenden, die möglicherweise besser mit deiner Ruby-Version kompatibel ist.
Reduziere den Speicherverbrauch: Es kann hilfreich sein, andere Teile deiner Anwendung oder des Servers zu optimieren, um den Gesamtspeicherverbrauch zu reduzieren, was den Druck auf jemalloc verringern kann.
Prüfe die Systemlimits: Manchmal können Systemlimits wie ulimit die Anwendung beeinträchtigen. Prüfe die Limits und erhöhe sie gegebenenfalls:
bash
Wenn diese Schritte das Problem nicht lösen, könnte es nützlich sein, mehr Informationen über die Konfiguration deines Servers und Details über die Installation und Konfiguration deiner Mastodon-Instanz zu haben. Manchmal kann das Problem spezifischer sein als es auf den ersten Blick erscheint.`
and solved it with the 1st solution
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 RAILS_ENV=production bundle exec rails assets:precompile
and set
ulimit -n 4096
too.Now, i tryed to enable:
:~/live$ RAILS_ENV=production bin/tootctl settings registrations open
and get the same error. So i have to do export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 aggain and after that i can open the registration.
Greetings,
Jürgen
Beta Was this translation helpful? Give feedback.
All reactions