totaljs / framework4

Total.js framework v4
https://www.totaljs.com
Other
99 stars 36 forks source link

ROUTE timeout is not working #12

Closed KangGeunSu closed 3 years ago

KangGeunSu commented 3 years ago

my ROUTE total4.js ROUTE("GET /test", handler, [1000], size || 5); handler is Null

Request GET /test -> status 503 (About 10s)

total3.js ROUTE("GET /test", handler, [1000], size || 5); handler is Null

Request GET /test -> status 408 (1s)

total4.js is ROUTE Timeout is Not working...

petersirka commented 3 years ago

Hi @KangGeunSu. I have improved timeouts in Total.js 4. Timeouts are not precise because Total.js has five seconds interval (due to performance) that checks timeouts in all unclosed requests. Therefore you have different times.

KangGeunSu commented 3 years ago

OK, then StatusCode is 503 correct? The timeout seems to be 408.

Thank you

petersirka commented 3 years ago

Yes - it's correct. I have changed it from 408 to 503 because WebKit/Blink performs the request again if the response is 408. So the web server could be overloaded with that behaviour.

KangGeunSu commented 3 years ago

OK! Thank You!