diff options
author | Igor Goncharovskiy <igor.goncharovsky@gmail.com> | 2014-06-16 09:04:05 +0000 |
---|---|---|
committer | Igor Goncharovskiy <igor.goncharovsky@gmail.com> | 2014-06-16 09:04:05 +0000 |
commit | a1e0a5e4b07387bcc59afa7c0ab9f960a389ac15 (patch) | |
tree | b32c92f6d58fb19eaa7af132f6ad3f2f7977cf34 /res | |
parent | 8313964d726d2f6f3397aff12c573588a11aaea0 (diff) |
We have faced situation when using CDR and CEL by sqlite3 modules. With system having high load (~100 concurrent calls created by sipp) we found many cdr and cel records missed. There is special finction in sqlite3, that make able to fix this situation - sqlite3_wait_timeout, that also can replace awful code cdr_sqlite3 ad cel_sqlite3 modules. Also this function can be used for aastdb and res_config_sqlite3 to avoid missed writes to sqlite db.
#ASTERISK-23766 #close
Reported by: Igor Goncharovsky
Review: https://reviewboard.asterisk.org/r/3559/
........
Merged revisions 416336 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 416337 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 416338 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/res_config_sqlite3.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/res/res_config_sqlite3.c b/res/res_config_sqlite3.c index 0a4b1acac..6fa60386d 100644 --- a/res/res_config_sqlite3.c +++ b/res/res_config_sqlite3.c @@ -324,6 +324,7 @@ static int db_open(struct realtime_sqlite3_db *db) ao2_unlock(db); return -1; } + sqlite3_busy_timeout(db->handle, 1000); if (db->debug) { sqlite3_trace(db->handle, trace_cb, db); |