I'm using Net-SNMP on an Ubuntu 14.04 server to capture SNMP traps in snmptrapd, which I've set up (using "perl do '/path/to/traphandler.pl'" in the /etc/snmp/snmptrapd.conf) to call a Perl::DBI script to insert data into a mySQL database. Everything has been running fine since 16th March, then about 9am yesterday (6th April - Bank Holiday - typical) the database updates stopped, though the syslog shows that the traps were still coming in.
I can't see anything obvious in /var/log, so I'm wondering whether the database connection simply expired and closed. Does that happen? I stopped and restarted snmptrapd and it all started working again, which makes me think that was the cause. How would I check?
Yes it is 28800 seconds
connect_timeout=28800
wait_timeout=28800
interactive_timeout=28800
You can set the values in /etc/my.cnf
If you want to change it then you have to run this query:
SET GLOBAL interactive_timeout = 100; //Change it if you want
SET GLOBAL wait_timeout = 100;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With