Index: api.scm ================================================================== --- api.scm +++ api.scm @@ -250,11 +250,11 @@ (assert ok "FATAL: database file and run-id not aligned."))))) (ttdat *server-info*) (server-state (tt-state ttdat)) (status (cond ;; ((> newcount 600) 'busy) - ((> newcount 300) 'loaded) + ((> newcount 500) 'loaded) (else 'ok))) (errmsg (case status ((busy) (conc "Server overloaded, "newcount" threads in flight")) ((loaded) (conc "Server loaded, "newcount" threads in flight")) (else #f))) Index: dbfile.scm ================================================================== --- dbfile.scm +++ dbfile.scm @@ -1141,11 +1141,19 @@ ;; r/w is a flag to indicate if the db is modified by this query #t = yes, #f = no ;; (define (dbfile:with-db dbstruct run-id r/w proc params) (assert dbstruct "FATAL: db:with-db called with dbstruct "#f) (assert (dbr:dbstruct? dbstruct) "FATAL: dbstruct is "dbstruct) - (let* ((use-mutex (> *api-process-request-count* 25)) ;; risk of db corruption + ;; Testing 2023, March 14th. I went from full time use of the mutext to no use at all and + ;; didn't see much change in the frequency of the messages: + ;; Warning (#): in thread: (bind!) bad parameter or other API misuse + ;; allowing request count to go up to 1000 and other crashes showed up: + ;; Warning (#): in thread: (deserialize) unexpected end of input: # + ;; + ;; leave it fully on for now, test later if there is a performance issue + ;; + (let* ((use-mutex #t) ;; (> *api-process-request-count* 25)) ;; risk of db corruption (have-struct (dbr:dbstruct? dbstruct)) (dbdat (if have-struct ;; this stuff just allows us to call with a db handle directly (db:open-db dbstruct run-id (dbfile:db-init-proc)) ;; (dbfile:get-subdb dbstruct run-id) #f)) (db (if have-struct ;; this stuff just allows us to call with a db handle directly