mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Decrease TurfWar background query intervals
The database is much larger than it was when we started, so these background reporting queries have become much more expensive than before. We also had someone make 750k claims in one day, and even hundreds of thousands per hour, which broke our assumptions about hourly / daily reports being cheap.
This commit is contained in:
parent
6d39c6f646
commit
57c0dcdc29
1 changed files with 23 additions and 24 deletions
|
@ -96,11 +96,11 @@
|
|||
#define SUPERVISE_MS 1000 // how often to stat() asset files
|
||||
#define KEEPALIVE_MS 60000 // max time to keep idle conn open
|
||||
#define MELTALIVE_MS 2000 // panic keepalive under heavy load
|
||||
#define SCORE_UPDATE_MS 90000 // how often to regenerate /score
|
||||
#define SCORE_H_UPDATE_MS 10000 // how often to regenerate /score/hour
|
||||
#define SCORE_D_UPDATE_MS 15000 // how often to regenerate /score/day
|
||||
#define SCORE_W_UPDATE_MS 30000 // how often to regenerate /score/week
|
||||
#define SCORE_M_UPDATE_MS 60000 // how often to regenerate /score/month
|
||||
#define SCORE_D_UPDATE_MS 30000 // how often to regenerate /score/day
|
||||
#define SCORE_W_UPDATE_MS 70000 // how often to regenerate /score/week
|
||||
#define SCORE_M_UPDATE_MS 100000 // how often to regenerate /score/month
|
||||
#define SCORE_UPDATE_MS 200000 // how often to regenerate /score
|
||||
#define ACCEPT_DEADLINE_MS 100 // how long accept() can take to find worker
|
||||
#define CLAIM_DEADLINE_MS 100 // how long /claim may block if queue is full
|
||||
#define CONCERN_LOAD .75 // avoid keepalive, upon this connection load
|
||||
|
@ -424,7 +424,6 @@ int DbOpen(const char *path, sqlite3 **db) {
|
|||
|
||||
// why not make the statement prepare api a little less hairy too
|
||||
int DbPrepare(sqlite3 *db, sqlite3_stmt **stmt, const char *sql) {
|
||||
kprintf("%s\n", sql);
|
||||
return sqlite3_prepare_v2(db, sql, -1, stmt, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue