SQL connection errors when stress testing mobile service: SQL failure after 3 attempts


i have created mobile service (node.js), has been running few months 50-100k api calls per day no issues.

the usage of service scaled soon, , receive higher traffic, running stress tests (on staging deployment of same service).

the api in question queries data sql database attached mobile service, caches resulting data in redis database 5 minutes, each call identical parameters not access sql database, redis cache.

my first test never has problems:

run single api calls fast possible using program wrk (https://github.com/wg/wrk). test never has problem, , have run hour continuously sustained rate of 200 req/s , few timeout errors.

the second test causes problems:

i created list of 5 different api calls same service (same endpoint, different parameters), , run randomly interweaved fast possible. use program locust (http://locust.io) this, spawing 10.000 clients @ rate of 500 per second. first few seconds goes ok, connections start failing massively.

i mostly:

error: sql failure after 3 attempts. error: [microsoft][sql server native client 10.0]tcp provider: connection attempt failed because connected party did not respond after period of time, or established connection failed because connected host has failed respond.
 (sqlstate: 08001, code: 10060)

and see in http response:

connectionerror(protocolerror('connection aborted.', gaierror(8, 'nodename nor servname provided, or not known')),)

the strange thing since running same 5 calls repeatedly, first of each call access sql database, every subsequent call return data directly redis, , not try access sql database @ all.

in azure console sql database in question, see 1860 successful connections , 11 failed connections, not explain massive failure rate seeing.



Microsoft Azure  >  Azure Mobile Apps



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

How to fix error Msg 1801, Level 16, State 3, Line 1

How to Share webservice object to all user