Почему процесс жрет много процессорного времени, зависая в select?
Почему процесс жрет много процессорного времени, зависая в select? Конкретно процесс beam.smp висит:
Process 2005 attached — interrupt to quit select(0, NULL, NULL, NULL, NULL
2005 rabbitmq 20 0 2125m 56m 2576 S 56.6 0.7 169:21.78 beam.smp
56,6% — это загрузка процессора.
При том маршрутизации очередей в RabbitMQ не так много.
По памяти не так и много:
Некий erlang’овский rpmd-daemon отвисает на таких системных выховах:
Process 1017 attached — interrupt to quit select(7, [3 5], NULL, NULL, <3, 71750>) = 0 (Timeout) gettimeofday(<1426691822, 95294>, NULL) = 0 select(7, [3 5], NULL, NULL, <5, 0>) = 0 (Timeout) gettimeofday(<1426691827, 102147>, NULL) = 0 select(7, [3 5], NULL, NULL, <5, 0>) = 0 (Timeout)
Beam smp что это
Debian apt-get install erlang-dbg
Alpine apk add erlang-erts
Arch Linux pacman -S erlang-nox
Kali Linux apt-get install erlang17-dbg
erlang-base
Erlang/OTP virtual machine and base applications
This package contains the Erlang/OTP runtime implementation, which is configured and built without HiPE support (compiles to byte-code only), and minimal set of Erlang applications: compiler — compiles Erlang code to byte-code; erts — the Erlang runtime system application; kernel — code necessary to run the Erlang runtime system itself; ose — code for Enea OSE operating system; sasl — the system architecture support libraries application; stdlib — modules for manipulating lists, strings, files etc.
erlang-base-hipe
Erlang/OTP HiPE enabled virtual machine and base applications
This package contains the Erlang/OTP runtime implementation, which is configured and built with HiPE support (allows compiling to native code), and minimal set of Erlang applications: compiler — compiles Erlang code to byte-code; erts — the Erlang runtime system application; kernel — code necessary to run the Erlang runtime system itself; ose — code for Enea OSE operating system; sasl — the system architecture support libraries application; stdlib — modules for manipulating lists, strings, files etc.
erlang-erts
General-purpose programming language and runtime environment
erlang-dbg
Erlang/OTP symbol files
The files containing debug symbols for binaries and libraries in Erlang to help in debugging applications build with them. You will not normally need to install this package.
couchdb
RESTful document oriented database
Apache CouchDB is a distributed, fault-tolerant and schema-free document-oriented database accessible via a RESTful HTTP/JSON API. Among other features, it provides robust, incremental replication with bi-directional conflict detection and resolution, and is queryable and indexable using a table-oriented view engine with JavaScript acting as the default view definition language. CouchDB is written in Erlang, but can be easily accessed from any environment that provides means to make HTTP requests. There are a multitude of third-party client libraries that make this even easier for a variety of programming languages and environments.
erlang
Concurrent, real-time, distributed functional language
Open Source Erlang is a functional programming language designed at the Ericsson Computer Science Laboratory. Some of Erlang main features are: * Clear declarative syntax and is largely free from side-effects; * Built-in support for real-time, concurrent and distributed programming; * Designed for development of robust and continuously operated programs; * Dynamic code replacement at runtime. The Erlang distribution also includes OTP (Open Telecom Platform) which provides a rich set of libraries and applications. This package is a dummy package which will install Erlang/OTP runtime, applications, sources, code examples and the Erlang editing mode for Emacs.
erlang-nox
Erlang/OTP applications that don't require X Window System
This package is a dummy package which will install all Erlang/OTP applications which do not require X Window System to run.
erlang17-base
Erlang/OTP virtual machine and base applications
This package contains the Erlang/OTP runtime implementation version 17 to fix couchdb in Kali-rolling. This is a temporay package. It should be removed once python-faraday doesn't need couchdb anymore.
erlang17-base-hipe
Erlang/OTP HiPE enabled virtual machine and base applications
This package contains the Erlang/OTP runtime implementation version 17 to fix couchdb in Kali-rolling. This is a temporay package. It should be removed once python-faraday doesn't need couchdb anymore.
erlang17-dbg
Erlang/OTP symbol files
The files containing debug symbols for binaries and libraries in Erlang to help in debugging applications build with them. You will not normally need to install this package. This package is the version 17 to fix couchdb in Kali-rolling. This is a temporay package. It should be removed once python-faraday doesn't need couchdb anymore.
How To Install Beam.smp?
This package contains the Erlang/OTP runtime implementation, which is configured and built without HiPE support (compiles to byte-code only), and minimal set of Erlang applications: compiler — compiles Erlang code to byte-code; erts — the Erlang runtime system application; kernel — code necessary to run the Erlang runtime system itself; ose — code for Enea OSE operating system; sasl — the system architecture support libraries application; stdlib — modules for manipulating lists, strings, files etc.
erlang-base-hipe
This package contains the Erlang/OTP runtime implementation, which is configured and built with HiPE support (allows compiling to native code), and minimal set of Erlang applications: compiler — compiles Erlang code to byte-code; erts — the Erlang runtime system application; kernel — code necessary to run the Erlang runtime system itself; ose — code for Enea OSE operating system; sasl — the system architecture support libraries application; stdlib — modules for manipulating lists, strings, files etc.
erlang-erts
erlang-dbg
The files containing debug symbols for binaries and libraries in Erlang to help in debugging applications build with them. You will not normally need to install this package.
couchdb
Apache CouchDB is a distributed, fault-tolerant and schema-free document-oriented database accessible via a RESTful HTTP/JSON API. Among other features, it provides robust, incremental replication with bi-directional conflict detection and resolution, and is queryable and indexable using a table-oriented view engine with JavaScript acting as the default view definition language. CouchDB is written in Erlang, but can be easily accessed from any environment that provides means to make HTTP requests. There are a multitude of third-party client libraries that make this even easier for a variety of programming languages and environments.
erlang
Open Source Erlang is a functional programming language designed at the Ericsson Computer Science Laboratory. Some of Erlang main features are: * Clear declarative syntax and is largely free from side-effects; * Built-in support for real-time, concurrent and distributed programming; * Designed for development of robust and continuously operated programs; * Dynamic code replacement at runtime. The Erlang distribution also includes OTP (Open Telecom Platform) which provides a rich set of libraries and applications. This package is a dummy package which will install Erlang/OTP runtime, applications, sources, code examples and the Erlang editing mode for Emacs.
erlang-nox
This package is a dummy package which will install all Erlang/OTP applications which do not require X Window System to run.
erlang17-base
This package contains the Erlang/OTP runtime implementation version 17 to fix couchdb in Kali-rolling. This is a temporay package. It should be removed once python-faraday doesn’t need couchdb anymore.
erlang17-base-hipe
This package contains the Erlang/OTP runtime implementation version 17 to fix couchdb in Kali-rolling. This is a temporay package. It should be removed once python-faraday doesn’t need couchdb anymore.
erlang17-dbg
The files containing debug symbols for binaries and libraries in Erlang to help in debugging applications build with them. You will not normally need to install this package. This package is the version 17 to fix couchdb in Kali-rolling. This is a temporay package. It should be removed once python-faraday doesn’t need couchdb anymore.
RabbitMQ (beam.smp) and high CPU/memory load issue
I have a debian box running tasks with celery and rabbitmq for about a year. Recently I noticed tasks were not being processed so I logged into the system and noticed that celery could not connect to rabbitmq. I restarted rabbitmq-server and even though celery was not complaining anymore it was not executing new tasks now. The odd thing was that rabbitmq was devouring cpu and memory resources like crazy. Restarting server would not solve the problem. After spending couple hours looking for solution online to no avail I decided to rebuild the server.
I rebuilt new server with Debian 7.5, rabbitmq 2.8.4, celery 3.1.13 (Cipater). For about an hour or so everything worked beautifully again until celery started complaining again that it can’t connect to rabbitmq!
I restarted rabbitmq service rabbitmq-server start and same issue gain:
rabbitmq started again swelling up constantly pounding on cpu and slowly taking over all ram and swap:
Here’s the result on rabbitmqctl status :
Some entries from /var/log/rabbitmq:
UPDATE: Seems like problem was solved when installed newest version of rabbitmq (3.3.4-1) from rabbitmq.com repository. Originally I had one installed (2.8.4) from Debian repositories. So far rabbitmq-server is working smoothly. I will update this post if issue comes back.
UPDATE: Unfortunately after about 24 hours the issue reappeared where rabbitmq shut down and restarting the process would make it consume resources until it shuts down again within minutes.