+1 on Tristan's feedback. Ed, you can check at this propo also: https://github.com/pmacct/pmacct/wiki/RDBMS:-Customising-the-SQL-database-indexes
If commenting out sql_dont_try_update makes things work well then it means the setup is making use of UPDATE queries. Maybe you need a larger sql_cache_entries value if you reckon from the logs it is purging more often than once per minute? Paolo On Fri, Mar 03, 2017 at 11:55:07PM +0000, Tristan Bendall wrote: > Hi Edward > > I think what is happening here, in database speak, is that the primary key > for the new record isn't unique, and that's breaking DB rules. > > Basically the DB is trying to add a new record that already exists, and with > update turned off, it can't either update the matching record or add another > non unique record. > > I think you'll need to add a unique field (such as an auto incrementing ID > field) then include that in the primary key contstraint in the DB. > > > Tristan > > On 3 Mar 2017, at 17:49, Edward Henigin > <e...@eaohana.com<mailto:e...@eaohana.com>> wrote: > > Hi Paolo, > > When enabling sql_dont_try_update: true, I get these errors fairly > continuously: > > Mar 3 11:33:30 server nfacctd[10661]: ERROR ( ip_dst/sqlite3 ): columns > peer_ip_src, iface_in, ip_dst, stamp_inserted are not unique#012 > Mar 3 11:33:33 server nfacctd[10662]: ERROR ( ip_dst/sqlite3 ): columns > peer_ip_src, iface_in, ip_dst, stamp_inserted are not unique#012 > Mar 3 11:33:37 server nfacctd[10663]: ERROR ( ip_dst/sqlite3 ): columns > peer_ip_src, iface_in, ip_dst, stamp_inserted are not unique#012 > Mar 3 11:33:44 server nfacctd[10667]: ERROR ( ip_dst/sqlite3 ): columns > peer_ip_src, iface_in, ip_dst, stamp_inserted are not unique#012 > Mar 3 11:33:47 server nfacctd[10668]: ERROR ( ip_dst/sqlite3 ): columns > peer_ip_src, iface_in, ip_dst, stamp_inserted are not unique#012 > > Any suggestions? Per the instructions, we do have these configured: > > sql_refresh_time: 60 > sql_history: 1m > sql_history_roundoff: m > nfacctd_time_new: true > > After commenting out sql_dont_try_update: true there are no errors > operationally. > _______________________________________________ > pmacct-discussion mailing list > http://www.pmacct.net/#mailinglists > _______________________________________________ > pmacct-discussion mailing list > http://www.pmacct.net/#mailinglists _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists