Syslog processes RabbitMQ log file very slowly

Bug #1580197 reported by Ilya Shakhat
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Maksim Malchuk
Mitaka
Won't Fix
Medium
Fuel Sustaining

Bug Description

As result of failures RabbitMQ created huge log file (~3Gb). rsyslog processes this file very slowly, resulting in large delay between a moment when message was generated and when it is put into files at Fuel master node. Even a week after the issue syslog still processes old messages.

In average rsyslog is able to process 100M file in 3.5 hours:

[root@fuel ~]# ls -al rabbitmq.log.1
-rw-------. 1 root root 108237878 May 10 13:25 rabbitmq.log.1

[root@fuel ~]# head rabbitmq.log.1
2016-05-10T07:30:35.388293+00:00 notice: =ERROR REPORT==== 4-May-2016::00:18:48 ===
2016-05-10T07:30:35.388293+00:00 notice: Channel error on connection <0.9727.15> (192.168.0.49:48984 -> 192.168.0.88:5673, vhost: '/', user: 'nova'), channel 1:
2016-05-10T07:30:35.388293+00:00 notice: operation basic.consume caused a channel exception not_found: "no queue 'reply_611b2b8a718049219bf62ca37ef9d906' in vhost '/'"
2016-05-10T07:30:35.388293+00:00 notice: =ERROR REPORT==== 4-May-2016::00:18:48 ===
2016-05-10T07:30:35.388293+00:00 notice: Channel error on connection <0.9727.15> (192.168.0.49:48984 -> 192.168.0.88:5673, vhost: '/', user: 'nova'), channel 1:
2016-05-10T07:30:35.388293+00:00 notice: operation basic.consume caused a channel exception not_found: "no queue 'reply_611b2b8a718049219bf62ca37ef9d906' in vhost '/'"
2016-05-10T07:30:35.388293+00:00 notice: =ERROR REPORT==== 4-May-2016::00:18:48 ===
2016-05-10T07:30:35.388293+00:00 notice: Channel error on connection <0.9727.15> (192.168.0.49:48984 -> 192.168.0.88:5673, vhost: '/', user: 'nova'), channel 1:
2016-05-10T07:30:35.388293+00:00 notice: operation basic.consume caused a channel exception not_found: "no queue 'reply_611b2b8a718049219bf62ca37ef9d906' in vhost '/'"
2016-05-10T07:30:35.388293+00:00 notice: =ERROR REPORT==== 4-May-2016::00:18:48 ===

[root@fuel ~]# tail rabbitmq.log.1
2016-05-10T11:00:38.001870+00:00 notice: Channel error on connection <0.9727.15> (192.168.0.49:48984 -> 192.168.0.88:5673, vhost: '/', user: 'nova'), channel 1:
2016-05-10T11:00:38.001870+00:00 notice: operation basic.consume caused a channel exception not_found: "no queue 'reply_611b2b8a718049219bf62ca37ef9d906' in vhost '/'"
2016-05-10T11:00:38.001876+00:00 notice: =ERROR REPORT==== 4-May-2016::00:23:56 ===
2016-05-10T11:00:38.001876+00:00 notice: Channel error on connection <0.9727.15> (192.168.0.49:48984 -> 192.168.0.88:5673, vhost: '/', user: 'nova'), channel 1:
2016-05-10T11:00:38.001882+00:00 notice: operation basic.consume caused a channel exception not_found: "no queue 'reply_611b2b8a718049219bf62ca37ef9d906' in vhost '/'"
2016-05-10T11:00:38.001882+00:00 notice: =ERROR REPORT==== 4-May-2016::00:23:56 ===
2016-05-10T11:00:38.001889+00:00 notice: Channel error on connection <0.9727.15> (192.168.0.49:48984 -> 192.168.0.88:5673, vhost: '/', user: 'nova'), channel 1:
2016-05-10T11:00:38.001889+00:00 notice: operation basic.consume caused a channel exception not_found: "no queue 'reply_611b2b8a718049219bf62ca37ef9d906' in vhost '/'"
2016-05-10T11:00:38.001894+00:00 notice: =ERROR REPORT==== 4-May-2016::00:23:56 ===
2016-05-10T11:00:38.001894+00:00 notice: Channel error on connection <0.9727.15> (192.168.0.49:48984 -> 192.168.0.88:5673, vhost: '/', user: 'nova'), channel 1:

Steps to reproduce:
1. Emulate large RabbitMQ log file by creating a file similar to the one written by RabbitMQ to "/var/log/rabbitmq/rabbit@messaging-node-XXX". The size should be hundreds of Mb.
2. Check how syslog processes messages and how fast they are copied to Fuel master node

Note. This bug impacts supportability since logs are not available at Fuel master node and thus in the snapshot.

Revision history for this message
Ilya Shakhat (shakhat) wrote :

[root@fuel ~]# fuel2 fuel-version
api: '1'
auth_required: true
feature_groups: []
openstack_version: mitaka-9.0
release: '9.0'

Changed in fuel:
milestone: none → 9.0
Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

actual result

version

expected result

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Peter Zhurba (pzhurba)
Changed in fuel:
importance: Undecided → Medium
Revision history for this message
Peter Zhurba (pzhurba) wrote :

Hi, thank you for your report!
But some important thins still unclear.
How often did you face this issue. On what environment
Please provide diagnostic snapshot from the failed environment if it is possible.
Also recheck please is there atop log in snapshot.

Changed in fuel:
status: New → Incomplete
Peter Zhurba (pzhurba)
Changed in fuel:
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

Firstly, the logrotate should handle big files so there normally never a 3G file shall be created.
The default logging template that comes with the rabbitmq-server v3.6.1 package in Fuel 10 is:

# cat /etc/logrotate.d/rabbitmq-server
/var/log/rabbitmq/*.log {
        weekly
        missingok
        rotate 20
        compress
        delaycompress
        notifempty
        sharedscripts
        postrotate
            /etc/init.d/rabbitmq-server rotate-logs > /dev/null
        endscript
}

If it provides non optimal config, please either report upstream bug or/and let's override it with the Fuel logging configuration as well.

2nd, we should switch to rsyslog native support once it get to the RabbitMQ. Perhaps it is 3.7? See https://github.com/rabbitmq/rabbitmq-server/releases :
"RabbitMQ 3.7.0 Milestone 4 ... (snip) ... pluggable logging
backends (e.g. logging to Syslog no longer requires external tools)

For now Fuel leverages rsyslog's imfile, which is a non native way, for capturing logs from files and maybe slow, indeed

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

looks like this bug is related to https://bugs.launchpad.net/fuel/+bug/1580200

Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Maksim Malchuk (mmalchuk)
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

I believe it doesn't. The latter use syslog via native calls. While the rabbit uses imfile band aids

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

I believe that rsyslogd slows down due to imfile usage, so both related.
Still waiting for a scale env to run performance tests.

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

Won't fix for 9.0 due to HCF. Moving to 10.0.

tags: added: area-library
no longer affects: fuel/newton
Dmitry Klenov (dklenov)
Changed in fuel:
status: Incomplete → Confirmed
Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

Dmitry, do you have an environment with an issue or diagnostic snapshot?

Changed in fuel:
status: Confirmed → Incomplete
Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

Close as Invalid, due to no activity more than month.

Changed in fuel:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.