Overview
Comment: | Added storage of commands in the server thread hash, added debug prints when the max threads is exceeded |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.81 |
Files: | files | file ages | folders |
SHA1: |
2d46a2e3ec7c483707258306aec0058e |
User & Date: | mmgraham on 2024-06-27 16:45:21 |
Other Links: | branch diff | manifest | tags |
Context
2024-07-01
| ||
11:59 | Added CSCOPTS entry used for debugging check-in: 74949ef691 user: mrwellan tags: v1.81 | |
10:56 | Pulled in testcontrol panel improvements Leaf check-in: f8243ad180 user: mrwellan tags: v1.81-test-control-panel | |
2024-06-27
| ||
16:45 | Added storage of commands in the server thread hash, added debug prints when the max threads is exceeded check-in: 2d46a2e3ec user: mmgraham tags: v1.81 | |
2024-06-25
| ||
20:26 | Updated stepwise flow graph check-in: 24e3d80cf5 user: matt tags: v1.81 | |
Changes
Modified api.scm from [b08fe263c7] to [bf55d9f0a8].
︙ | |||
153 154 155 156 157 158 159 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - - + + + + + + + + + + + + + + + + + | tasks-set-state-given-param-key )) (define *db-write-mutexes* (make-hash-table)) (define *server-signature* #f) (define *api-threads* '()) |
︙ | |||
194 195 196 197 198 199 200 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + | ;; reads/writes to current in/out port ;; (define (api:tcp-dispatch-request-make-handler dbstruct) ;; cmd run-id params) (assert *toppath* "FATAL: api:tcp-dispatch-request-make-handler called but *toppath* not set.") (if (not *server-signature*) (set! *server-signature* (tt:mk-signature *toppath*))) (lambda (indat) |
︙ | |||
226 227 228 229 230 231 232 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | - + - - - + | ((ping) #t) ;; we are fine (else (assert ok "FATAL: database file and run-id not aligned."))))) (ttdat *server-info*) (server-state (tt-state ttdat)) (maxthreads 20) ;; make this a parameter? (status (cond |
︙ |
Modified tcp-transportmod.scm from [3b34f09355] to [2d80f8e52f].
︙ | |||
324 325 326 327 328 329 330 331 332 333 334 335 336 337 | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | + | (debug:print 0 *default-log-port* "Server is loaded, delaying "delay-wait" seconds") (thread-sleep! delay-wait))))) (case status ((busy) ;; result will be how long the server wants you to delay (let* ((raw-dly (if (number? result) result 0.1)) (dly (+ raw-dly (/ attemptnum 10)))) ;; (* raw-dly (/ attemptnum 2)))) (debug:print 0 *default-log-port* "WARNING: server for "dbfname" is busy, cmd is "cmd", will try again in "dly" seconds. This is attempt "(- attemptnum 1)) (debug:print 0 *default-log-port* errmsg) (thread-sleep! dly) (tt:handler ttdat cmd run-id params (+ attemptnum 1) readonly-mode dbfname testsuite mtexe server-start-proc))) ((loaded) (debug:print 0 *default-log-port* "WARNING: server for "dbfname" is loaded, slowing queries.") (tt:backoff-incr (tt-conn-host conn)(tt-conn-port conn)) result) ;; (tt:handler ttdat cmd run-id params (+ attemptnum 1) readonly-mode dbfname testsuite mtexe)) (else |
︙ |