Hello,

The software i work, has syslog facility enabled for debug logs.
It generates a huge amount of logs (12000 lines in 2 minutes) - about 100
log entries per second and this is put into a mysql backend.
However, I see that after about 2 minutes of run, my application stalls
and if I disable (delete the SystemEvents table in Syslog database), my
application continues fine.
My my.cnf and rsyslog.conf is attached along.
Any ideas?

Thanks
Mahesh
my.cnf
------------------
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version 
REL5-20120208
# Configuration name apsim generated for [email protected] at 
2013-06-05 13:04:19

[mysql]

# CLIENT #
port                           = 3306
socket                         = /var/lib/mysql/mysql.sock

[mysqld]

# GENERAL #
user                           = root
default_storage_engine         = InnoDB
socket                         = /var/lib/mysql/mysql.sock
pid_file                       = /var/lib/mysql/mysql.pid

# MyISAM #
key_buffer_size                = 32768M

# SAFETY #
max_allowed_packet             = 16M
max_connect_errors             = 1000000

# DATA STORAGE #
datadir                        = /var/lib/mysql/

# BINARY LOGGING #
log_bin                        = /var/lib/mysql/mysql-bin
expire_logs_days               = 14
sync_binlog                    = 1

# CACHES AND LIMITS #
tmp_table_size                 = 32M
#query_cache_size               = 0
#query_cache_limit              = 0
max_heap_table_size            = 32M
query_cache_type               = 0
max_connections                = 1000
thread_cache_size              = 200
open_files_limit               = 65535
table_definition_cache         = 4096
table_open_cache               = 4096

key_buffer = 256M
query_cache_size = 128M
query_cache_limit = 128MB
table_cache = 512
sort_buffer_size = 32M
myisam_sort_buffer_size = 32M
tmp_table_size = 64MB
#delay_key_write = 1
wait_timeout = 28800

# INNODB #
innodb_flush_method            = O_DIRECT
innodb_log_files_in_group      = 1
innodb_log_file_size           = 128M
innodb_flush_log_at_trx_commit = 0
innodb_file_per_table          = 1
innodb_buffer_pool_size        = 12G

# LOGGING #
log_error                      = /var/lib/mysql/mysql-error.log
log_queries_not_using_indexes  = 1
slow_query_log                 = 1
slow_query_log_file            = /var/lib/mysql/mysql-slow.log

------------------------------------------------------------------------------

rsyslog.conf
-----------------------------------------------------------------------


# rsyslog v5 configuration file

# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html

#### MODULES ####

$ModLoad ommysql.so # provides logging to mysql
$ModLoad imuxsock # provides support for local system logging (e.g. via logger 
command)
$ModLoad imklog   # provides kernel logging support (previously done by rklogd)
#$ModLoad immark  # provides --MARK-- message capability
$Modload imudp
$UDPServerRun 514
$Modload imtcp
## Optional
$UDPServerAddress 0.0.0.0
## Optional
#$RepeatedMsgReduction ()
$template dbFormat,"insert into Syslog(Message, Facility,FromHost, Priority, 
DeviceReportedTime, ReceivedAt) values ('%msg%', %syslogfacility%, 
'%HOSTNAME%',%syslogpriority%, '%timereported:::date-mysql%', 
'%timegenerated:::date-mysql%')",SQL
*.*       :ommysql:localhost,Syslog,rsyslog,root123

# Log all apsim messages to application debug _log

# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514

# Provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514

$template FILENAME,"/var/log/%fromhost-ip%/syslog.log"
*.* ?FILENAME

#### GLOBAL DIRECTIVES ####

# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat


# File syncing capability is disabled by default. This feature is usually not 
required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on

# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf


#### RULES ####

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none                :/var/log/messages

# Log apsim related stuff in mysql database
myapplication.*;                                       
:ommysql:localhost,Syslog,sysloguser,root123


# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure

# Log all the mail messages in one place.
mail.*                                                  -/var/log/maillog


# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages
*.emerg                                                 *

# Save news errors of level crit and higher in a special file.
uucp,news.crit                                          /var/log/spooler
# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log


# ### begin forwarding rule ###
# The statement between the begin ... end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
$WorkDirectory /var/lib/rsyslog # where to place spool files
$ActionQueueFileName dbq # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g   # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
$ActionQueueType LinkedList   # run asynchronously
$ActionResumeRetryCount -1    # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
#*.* @@remote-host:514
# ### end of the forwarding rule ###
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to