You are not logged in.
Pages: 1
Thanks, changing the cbMaxLen line fixed the truncate problem for me.
Hi, is there any method to set command timeout when executing SQL statements? My server side is SQL 2008 R2. Thank you.
Thanks you I've just come across the same problem. The buffer shouldn't need to be the same size as the content since the reading part is already being done in a loop. Setting the buffer too large (around 20MB in my case) will throw an ERROR_NO_SYSTEM_RESOURCES (1450) exception.
More info:
But still doesn't solve the queue length problem. Under a controlled stress test, the server takes 50ms to finish each request. I've set clone thread size to 256. A sudden burst of ~4000 incoming connection still return status 503 error half of the time.
but I assume the thread pool is for THttpServer but not THttpAPIServer
Please, pay attention to THttpApiServer.Clone method. This one creates the thread pool. Each cloned thread registers itself to http.sys and then http.sys manages it in the similar way as HttpServer does. As far as I understand you overflow not length of queue, but time request wait in queue. So AB is right - increase thread pool size.
oops.... I've missed the .Clone() function (though it was for something else...). Thx a lot~
Thx, but I assume the thread pool is for THttpServer but not THttpAPIServer? I've just tried THttpServer and deliberately block OnRequest(), then make 1000 http connections to the server, and the thread count of the server is well over 1000.
The main problem for me is to handle a sudden burst of incoming connection, say > 20000 at the same time. There is no need to process all the request at the same time. Client can wait but should not return any error. One connection per thread is already out of the question. Http API can handle it since it has build-in kernel mode request queue. The queue length can be easily setup in IIS, but it seems there is no easy way to change the value using Http API 1.0 (THttpAPIServer).
Also, afaik, THttpAPIServer can only handle one single OnRequest() at a time. Http.ReceiveHttpRequest() is only called once in the main loop. If OnRequest() is blocked then other incoming connections have to be waited in the request queue until another Http.ReceiveHttpRequest() is called. If the request queue is full then the next client will get an instant 503 error. My idea is to call Http.ReceiveHttpRequest() multiple times and split those requests into different threads.
Hi, is it possible to change the queue length? It seems that if the api server's OnRequest() took too long to process, and the incoming queue got filled up to 1000, the next incoming connection will get a 503 error. Under IIS there is an option to change the queue length ("kernel request limit" in IIS6) for a particular application pool (default is 1000), but is there any option to change it under http api server? Thx.
For example:
var
c : ansistring;
....
setlength(c, 4);
c[1] := #$F0;
c[2] := #$A8;
c[3] := #$B3;
c[4] := #$92;
System.UTF8ToString(c) and SynCommons.UTF8ToString(c) give different results. The specific character on unicode.org:
http://www.unicode.org/cgi-bin/GetUniha … 0%A8%B3%92
System's UTF8Tostring results D863 DCD2 which is correct, but SynCommons.UTF8ToString() gives 85C2 003F.
Using CharLength to test the above character's length:
LStr := UTF8ToString(c);
CharLength(LStr, 1)
System: 4 (correct, 4 bytes in total for a surrogate pair character)
SynCommons: 2
I have also tried other surrogate unicode pairs and have similar results.
Thanks.
Pages: 1