Lambda function “Error: connect ETIMEDOUT” when receive too many requests for MySQL querySocket.io mysql connection errorETIMEDOUT error when querying mysql databasecannot connect mysql with nodejscan't connect to mysql using nodejsI just cant find a fitting solution for this MySQL “Exists()” errorCloud SQL is throwing ETIMEDOUT error when queried from node js application deployed in google cloud app engineMysql connection error: Error: Packets out of order. Got: 45 Expected: 0How can I interact with a RDS MySQL instance with Node.js Lambda function?About node.js with mysqlI'm getting a Error using node package mysql v2.16.0 while connecting to database Error: Packets out of order. Got: 80 Expected: 0

Why does the Pilatus PC-24 have such a large "Wing Support"?

Mac no longer boots

How to restrict deletion of specific row of SQL server table

What is the origin of the minced oath “Jiminy”?

How is погода (weather) a count noun?

Why do many websites hide input when entering a OTP

Airport Security - advanced check, 4th amendment breach

Sci-fi story about aliens with cells based on arsenic or nitrogen, poisoned by oxygen

Is American Sign Language phonetic?

How can I find places to store/land a private airplane?

What is the difference between increasing volume and increasing gain?

Can Fabled Passage generate two mana with Amulet of Vigor?

I've been fired, was allowed to announce it as if I quit and given extra notice, how to handle the questions?

Can I voluntarily exit from the US after a 20 year overstay, or could I be detained at the airport?

Are there types of animals that can't make the trip to space? (physiologically)

Writing about real people - not giving offence

Parent asking for money after I moved out

How do we know Nemesis is not a black hole (or neutron star)?

How can we be sure our specific Christian confession is true, when every other Christian group claims that it's not?

Is the "spacetime" the same thing as the mathematical 4th dimension?

Is "weekend warrior" derogatory?

Does test run is also count as a run in MS Flow?

Was there an autocomplete utility in MS-DOS?

Actual Steps in Step Definition or Call Test Cases in Step Definition, What's the Best Practice?



Lambda function “Error: connect ETIMEDOUT” when receive too many requests for MySQL query


Socket.io mysql connection errorETIMEDOUT error when querying mysql databasecannot connect mysql with nodejscan't connect to mysql using nodejsI just cant find a fitting solution for this MySQL “Exists()” errorCloud SQL is throwing ETIMEDOUT error when queried from node js application deployed in google cloud app engineMysql connection error: Error: Packets out of order. Got: 45 Expected: 0How can I interact with a RDS MySQL instance with Node.js Lambda function?About node.js with mysqlI'm getting a Error using node package mysql v2.16.0 while connecting to database Error: Packets out of order. Got: 80 Expected: 0






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0















I am trying to do testing on my AWS lambda function which makes a query to RDS MySQL (t2.medium).
However, if I request the API a large number of times, although I can get query successfully with correct data, it sometimes results "Error: connect ETIMEDOUT".



Is there anything wrong in my code or setting?



I read some suggestions to set some parameters:



MySQL:




wait_timeout 1



max_connections 16000



interactive_timeout 6000



max_allowed_packet 1073741824




Lamdba:




Timeout 60 sec place the Lambda function in the same VPC as your RDS



Added VPC execution policy AWSLambdaVPCAccessExecutionRole



assign a security group to the lambda function



In the security attached to the RDS instance, added an inbound rule
for mysql



Confirm that Lambda function has access to the same VPC RDS database




Lambda Error Log




2019-03-28T18:51:47.353Z ab4fbbaf-1ea2-458b-a5b5-781cdfdd80df Error:
connect ETIMEDOUT



at Connection._handleConnectTimeout



(/var/task/node_modules/mysql/lib/Connection.js:411:13)



at Object.onceWrapper (events.js:313:30)



at emitNone (events.js:106:13)



at Socket.emit (events.js:208:7)



at Socket._onTimeout (net.js:420:8)



at ontimeout (timers.js:482:11)



at tryOnTimeout (timers.js:317:5)



at Timer.listOnTimeout (timers.js:277:5)




at Protocol._enqueue
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:144:48)



at Protocol.handshake
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:51:23)



at Connection.connect
(/var/task/node_modules/mysql/lib/Connection.js:118:18)



at Connection._implyConnect
(/var/task/node_modules/mysql/lib/Connection.js:453:10)



at Connection.query
(/var/task/node_modules/mysql/lib/Connection.js:198:8)



at Promise (/var/task/db.js:62:9)



at new Promise ()



at Object.retrieve (/var/task/db.js:55:10)



at exports.getAlerts (/var/task/index.js:59:24)



errorno: 'ETIMEDOUT',



code: 'ETIMEDOUT',



syscall: 'connect',



fatal: true




RDS Error Log




2019-03-28T18:18:49.378320Z 9500 [Note] Aborted connection 9500 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.392514Z 9498 [Note] Aborted connection 9498 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.470617Z 9499 [Note] Aborted connection 9499 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.636775Z 9501 [Note] Aborted connection 9501 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.694669Z 9502 [Note] Aborted connection 9502 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.803457Z 9503 [Note] Aborted connection 9503 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.824250Z 9504 [Note] Aborted connection 9504 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)




My db.js query on lambda



const mysql = require('mysql')
let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
let con = mysql.createConnection(dbParams)
con.query(sql, objectArr, (err2, results) =>
con.end()
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)



My test.js script



const request = require('request')
let errorCount = 0
let success = 0

for (let i = 0; i < 4000; i++)
console.log('Send')
request.get('https://myapi/users',
headers:
'client_id': 'app',
'Content-Type': 'application/json'

, (error, response, body) =>
if (error)
console.log('some error')
errorCount++
else
let jsonBody = JSON.parse(body)
if (jsonBody.code === 0)
success++
else
errorCount++



console.log('Success: ', success)
console.log('Error: ', errorCount)
)



Edit:
I also tried to change the i < 1 in test script, then it always gives me "Error: connect ETIMEDOUT. But with i < 900, it works successfully sometime



index.js



const db = require('./db.js')
exports.getUsers = async (event, context) =>
context.callbackWaitsForEmptyEventLoop = false
try
let sql = 'SELECT * FROM User'
let abc = await db.retrieve(sql, [], 'user')

let response =
statusCode: 200,
abc: abc,
code: 0

return response
catch (err)
console.log(err)
errorHandler(err)




db.js with Pool



const mysql = require('mysql')
const constants = require('./constants.js')

let dbParams =
host: constants.SQL_CONNECTION_HOST,
user: constants.SQL_CONNECTION_USER,
password: constants.SQL_CONNECTION_PASSWORD,
database: constants.SQL_CONNECTION_DATABASE,
multipleStatements: true,
maxConnections: 4


const pool = mysql.createPool(dbParams)
let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
pool.getConnection((err1, con) =>
if (err1)
console.log(err1)
return reject(new apiError.DatabaseError('An error occurred in retrieve pool'))

console.log('Pool connect successfully')
con.query(sql, objectArr, (err2, results) =>
con.end()
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)
)



Error Log after used pool




2019-03-28T23:35:24.144Z 91b0fc78-e4d1-4fd9-bdf7-923715b165c0 Error:
Handshake inactivity timeout



at Handshake.
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:163:17)



at emitNone (events.js:106:13)



at Handshake.emit (events.js:208:7)



at Handshake._onTimeout
(/var/task/node_modules/mysql/lib/protocol/sequences/Sequence.js:124:8)



at Timer._onTimeout
(/var/task/node_modules/mysql/lib/protocol/Timer.js:32:23)



at ontimeout (timers.js:482:11)



at tryOnTimeout (timers.js:317:5)



at Timer.listOnTimeout (timers.js:277:5)




at Protocol._enqueue
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:144:48)



at Protocol.handshake
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:51:23)



at PoolConnection.connect
(/var/task/node_modules/mysql/lib/Connection.js:118:18)



at Pool.getConnection (/var/task/node_modules/mysql/lib/Pool.js:48:16)



at Promise (/var/task/db.js:72:10)



at new Promise ()



at Object.retrieve (/var/task/db.js:67:10)



at exports.getAlerts (/var/task/index.js:59:24)



code: 'PROTOCOL_SEQUENCE_TIMEOUT',



fatal: true,



timeout: 10000




Set with Pool now and test it with request loop:



i < 100 result => Success: 866 and Error: 134 requests.



i < 10 result => Success: 8 and Error: 2 requests.



Error with Handshake inactivity timeout



db.js with con.createConnection outside



const mysql = require('mysql')
// initialize dbParams
let con = mysql.createConnection(dbParams)

let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
con.query(sql, objectArr, (err2, results) =>
//con.end() commet out connection end here
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)










share|improve this question


























  • How many times is "a large number of times" and over how long of an interval did you do this? (example, 1000 times in 60 seconds)

    – Michael - sqlbot
    Mar 28 at 23:05











  • SELECT * is mostly NEVER a good choice, especially without any limit... Maybe if you query less data it will take less time to retrieve it and timeout after more iterations. It is a nice test to stress all your system though

    – Zyigh
    Mar 28 at 23:25











  • @Zyigh I currently have only 3 row data in the User table. I will set a limit after

    – chan3600
    Mar 28 at 23:28












  • @Michael - sqlbot I have set with Pool now and test it with i < 100 request loop. And resulting Success: 866 and Error: 134 requests. Error with Handshake inactivity timeout

    – chan3600
    Mar 28 at 23:45












  • So... 1000 attempts over what period of time? Read up on MySQL's thread_cache_size -- while probably not the entire issue, a MySQL server is not able to accept an indefinite number of connections in a short time, due to the overhead of OS thread creation. The thread cache allows the server to keep them around for reuse.

    – Michael - sqlbot
    Mar 29 at 0:13

















0















I am trying to do testing on my AWS lambda function which makes a query to RDS MySQL (t2.medium).
However, if I request the API a large number of times, although I can get query successfully with correct data, it sometimes results "Error: connect ETIMEDOUT".



Is there anything wrong in my code or setting?



I read some suggestions to set some parameters:



MySQL:




wait_timeout 1



max_connections 16000



interactive_timeout 6000



max_allowed_packet 1073741824




Lamdba:




Timeout 60 sec place the Lambda function in the same VPC as your RDS



Added VPC execution policy AWSLambdaVPCAccessExecutionRole



assign a security group to the lambda function



In the security attached to the RDS instance, added an inbound rule
for mysql



Confirm that Lambda function has access to the same VPC RDS database




Lambda Error Log




2019-03-28T18:51:47.353Z ab4fbbaf-1ea2-458b-a5b5-781cdfdd80df Error:
connect ETIMEDOUT



at Connection._handleConnectTimeout



(/var/task/node_modules/mysql/lib/Connection.js:411:13)



at Object.onceWrapper (events.js:313:30)



at emitNone (events.js:106:13)



at Socket.emit (events.js:208:7)



at Socket._onTimeout (net.js:420:8)



at ontimeout (timers.js:482:11)



at tryOnTimeout (timers.js:317:5)



at Timer.listOnTimeout (timers.js:277:5)




at Protocol._enqueue
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:144:48)



at Protocol.handshake
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:51:23)



at Connection.connect
(/var/task/node_modules/mysql/lib/Connection.js:118:18)



at Connection._implyConnect
(/var/task/node_modules/mysql/lib/Connection.js:453:10)



at Connection.query
(/var/task/node_modules/mysql/lib/Connection.js:198:8)



at Promise (/var/task/db.js:62:9)



at new Promise ()



at Object.retrieve (/var/task/db.js:55:10)



at exports.getAlerts (/var/task/index.js:59:24)



errorno: 'ETIMEDOUT',



code: 'ETIMEDOUT',



syscall: 'connect',



fatal: true




RDS Error Log




2019-03-28T18:18:49.378320Z 9500 [Note] Aborted connection 9500 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.392514Z 9498 [Note] Aborted connection 9498 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.470617Z 9499 [Note] Aborted connection 9499 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.636775Z 9501 [Note] Aborted connection 9501 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.694669Z 9502 [Note] Aborted connection 9502 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.803457Z 9503 [Note] Aborted connection 9503 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.824250Z 9504 [Note] Aborted connection 9504 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)




My db.js query on lambda



const mysql = require('mysql')
let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
let con = mysql.createConnection(dbParams)
con.query(sql, objectArr, (err2, results) =>
con.end()
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)



My test.js script



const request = require('request')
let errorCount = 0
let success = 0

for (let i = 0; i < 4000; i++)
console.log('Send')
request.get('https://myapi/users',
headers:
'client_id': 'app',
'Content-Type': 'application/json'

, (error, response, body) =>
if (error)
console.log('some error')
errorCount++
else
let jsonBody = JSON.parse(body)
if (jsonBody.code === 0)
success++
else
errorCount++



console.log('Success: ', success)
console.log('Error: ', errorCount)
)



Edit:
I also tried to change the i < 1 in test script, then it always gives me "Error: connect ETIMEDOUT. But with i < 900, it works successfully sometime



index.js



const db = require('./db.js')
exports.getUsers = async (event, context) =>
context.callbackWaitsForEmptyEventLoop = false
try
let sql = 'SELECT * FROM User'
let abc = await db.retrieve(sql, [], 'user')

let response =
statusCode: 200,
abc: abc,
code: 0

return response
catch (err)
console.log(err)
errorHandler(err)




db.js with Pool



const mysql = require('mysql')
const constants = require('./constants.js')

let dbParams =
host: constants.SQL_CONNECTION_HOST,
user: constants.SQL_CONNECTION_USER,
password: constants.SQL_CONNECTION_PASSWORD,
database: constants.SQL_CONNECTION_DATABASE,
multipleStatements: true,
maxConnections: 4


const pool = mysql.createPool(dbParams)
let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
pool.getConnection((err1, con) =>
if (err1)
console.log(err1)
return reject(new apiError.DatabaseError('An error occurred in retrieve pool'))

console.log('Pool connect successfully')
con.query(sql, objectArr, (err2, results) =>
con.end()
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)
)



Error Log after used pool




2019-03-28T23:35:24.144Z 91b0fc78-e4d1-4fd9-bdf7-923715b165c0 Error:
Handshake inactivity timeout



at Handshake.
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:163:17)



at emitNone (events.js:106:13)



at Handshake.emit (events.js:208:7)



at Handshake._onTimeout
(/var/task/node_modules/mysql/lib/protocol/sequences/Sequence.js:124:8)



at Timer._onTimeout
(/var/task/node_modules/mysql/lib/protocol/Timer.js:32:23)



at ontimeout (timers.js:482:11)



at tryOnTimeout (timers.js:317:5)



at Timer.listOnTimeout (timers.js:277:5)




at Protocol._enqueue
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:144:48)



at Protocol.handshake
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:51:23)



at PoolConnection.connect
(/var/task/node_modules/mysql/lib/Connection.js:118:18)



at Pool.getConnection (/var/task/node_modules/mysql/lib/Pool.js:48:16)



at Promise (/var/task/db.js:72:10)



at new Promise ()



at Object.retrieve (/var/task/db.js:67:10)



at exports.getAlerts (/var/task/index.js:59:24)



code: 'PROTOCOL_SEQUENCE_TIMEOUT',



fatal: true,



timeout: 10000




Set with Pool now and test it with request loop:



i < 100 result => Success: 866 and Error: 134 requests.



i < 10 result => Success: 8 and Error: 2 requests.



Error with Handshake inactivity timeout



db.js with con.createConnection outside



const mysql = require('mysql')
// initialize dbParams
let con = mysql.createConnection(dbParams)

let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
con.query(sql, objectArr, (err2, results) =>
//con.end() commet out connection end here
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)










share|improve this question


























  • How many times is "a large number of times" and over how long of an interval did you do this? (example, 1000 times in 60 seconds)

    – Michael - sqlbot
    Mar 28 at 23:05











  • SELECT * is mostly NEVER a good choice, especially without any limit... Maybe if you query less data it will take less time to retrieve it and timeout after more iterations. It is a nice test to stress all your system though

    – Zyigh
    Mar 28 at 23:25











  • @Zyigh I currently have only 3 row data in the User table. I will set a limit after

    – chan3600
    Mar 28 at 23:28












  • @Michael - sqlbot I have set with Pool now and test it with i < 100 request loop. And resulting Success: 866 and Error: 134 requests. Error with Handshake inactivity timeout

    – chan3600
    Mar 28 at 23:45












  • So... 1000 attempts over what period of time? Read up on MySQL's thread_cache_size -- while probably not the entire issue, a MySQL server is not able to accept an indefinite number of connections in a short time, due to the overhead of OS thread creation. The thread cache allows the server to keep them around for reuse.

    – Michael - sqlbot
    Mar 29 at 0:13













0












0








0








I am trying to do testing on my AWS lambda function which makes a query to RDS MySQL (t2.medium).
However, if I request the API a large number of times, although I can get query successfully with correct data, it sometimes results "Error: connect ETIMEDOUT".



Is there anything wrong in my code or setting?



I read some suggestions to set some parameters:



MySQL:




wait_timeout 1



max_connections 16000



interactive_timeout 6000



max_allowed_packet 1073741824




Lamdba:




Timeout 60 sec place the Lambda function in the same VPC as your RDS



Added VPC execution policy AWSLambdaVPCAccessExecutionRole



assign a security group to the lambda function



In the security attached to the RDS instance, added an inbound rule
for mysql



Confirm that Lambda function has access to the same VPC RDS database




Lambda Error Log




2019-03-28T18:51:47.353Z ab4fbbaf-1ea2-458b-a5b5-781cdfdd80df Error:
connect ETIMEDOUT



at Connection._handleConnectTimeout



(/var/task/node_modules/mysql/lib/Connection.js:411:13)



at Object.onceWrapper (events.js:313:30)



at emitNone (events.js:106:13)



at Socket.emit (events.js:208:7)



at Socket._onTimeout (net.js:420:8)



at ontimeout (timers.js:482:11)



at tryOnTimeout (timers.js:317:5)



at Timer.listOnTimeout (timers.js:277:5)




at Protocol._enqueue
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:144:48)



at Protocol.handshake
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:51:23)



at Connection.connect
(/var/task/node_modules/mysql/lib/Connection.js:118:18)



at Connection._implyConnect
(/var/task/node_modules/mysql/lib/Connection.js:453:10)



at Connection.query
(/var/task/node_modules/mysql/lib/Connection.js:198:8)



at Promise (/var/task/db.js:62:9)



at new Promise ()



at Object.retrieve (/var/task/db.js:55:10)



at exports.getAlerts (/var/task/index.js:59:24)



errorno: 'ETIMEDOUT',



code: 'ETIMEDOUT',



syscall: 'connect',



fatal: true




RDS Error Log




2019-03-28T18:18:49.378320Z 9500 [Note] Aborted connection 9500 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.392514Z 9498 [Note] Aborted connection 9498 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.470617Z 9499 [Note] Aborted connection 9499 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.636775Z 9501 [Note] Aborted connection 9501 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.694669Z 9502 [Note] Aborted connection 9502 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.803457Z 9503 [Note] Aborted connection 9503 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.824250Z 9504 [Note] Aborted connection 9504 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)




My db.js query on lambda



const mysql = require('mysql')
let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
let con = mysql.createConnection(dbParams)
con.query(sql, objectArr, (err2, results) =>
con.end()
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)



My test.js script



const request = require('request')
let errorCount = 0
let success = 0

for (let i = 0; i < 4000; i++)
console.log('Send')
request.get('https://myapi/users',
headers:
'client_id': 'app',
'Content-Type': 'application/json'

, (error, response, body) =>
if (error)
console.log('some error')
errorCount++
else
let jsonBody = JSON.parse(body)
if (jsonBody.code === 0)
success++
else
errorCount++



console.log('Success: ', success)
console.log('Error: ', errorCount)
)



Edit:
I also tried to change the i < 1 in test script, then it always gives me "Error: connect ETIMEDOUT. But with i < 900, it works successfully sometime



index.js



const db = require('./db.js')
exports.getUsers = async (event, context) =>
context.callbackWaitsForEmptyEventLoop = false
try
let sql = 'SELECT * FROM User'
let abc = await db.retrieve(sql, [], 'user')

let response =
statusCode: 200,
abc: abc,
code: 0

return response
catch (err)
console.log(err)
errorHandler(err)




db.js with Pool



const mysql = require('mysql')
const constants = require('./constants.js')

let dbParams =
host: constants.SQL_CONNECTION_HOST,
user: constants.SQL_CONNECTION_USER,
password: constants.SQL_CONNECTION_PASSWORD,
database: constants.SQL_CONNECTION_DATABASE,
multipleStatements: true,
maxConnections: 4


const pool = mysql.createPool(dbParams)
let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
pool.getConnection((err1, con) =>
if (err1)
console.log(err1)
return reject(new apiError.DatabaseError('An error occurred in retrieve pool'))

console.log('Pool connect successfully')
con.query(sql, objectArr, (err2, results) =>
con.end()
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)
)



Error Log after used pool




2019-03-28T23:35:24.144Z 91b0fc78-e4d1-4fd9-bdf7-923715b165c0 Error:
Handshake inactivity timeout



at Handshake.
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:163:17)



at emitNone (events.js:106:13)



at Handshake.emit (events.js:208:7)



at Handshake._onTimeout
(/var/task/node_modules/mysql/lib/protocol/sequences/Sequence.js:124:8)



at Timer._onTimeout
(/var/task/node_modules/mysql/lib/protocol/Timer.js:32:23)



at ontimeout (timers.js:482:11)



at tryOnTimeout (timers.js:317:5)



at Timer.listOnTimeout (timers.js:277:5)




at Protocol._enqueue
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:144:48)



at Protocol.handshake
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:51:23)



at PoolConnection.connect
(/var/task/node_modules/mysql/lib/Connection.js:118:18)



at Pool.getConnection (/var/task/node_modules/mysql/lib/Pool.js:48:16)



at Promise (/var/task/db.js:72:10)



at new Promise ()



at Object.retrieve (/var/task/db.js:67:10)



at exports.getAlerts (/var/task/index.js:59:24)



code: 'PROTOCOL_SEQUENCE_TIMEOUT',



fatal: true,



timeout: 10000




Set with Pool now and test it with request loop:



i < 100 result => Success: 866 and Error: 134 requests.



i < 10 result => Success: 8 and Error: 2 requests.



Error with Handshake inactivity timeout



db.js with con.createConnection outside



const mysql = require('mysql')
// initialize dbParams
let con = mysql.createConnection(dbParams)

let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
con.query(sql, objectArr, (err2, results) =>
//con.end() commet out connection end here
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)










share|improve this question
















I am trying to do testing on my AWS lambda function which makes a query to RDS MySQL (t2.medium).
However, if I request the API a large number of times, although I can get query successfully with correct data, it sometimes results "Error: connect ETIMEDOUT".



Is there anything wrong in my code or setting?



I read some suggestions to set some parameters:



MySQL:




wait_timeout 1



max_connections 16000



interactive_timeout 6000



max_allowed_packet 1073741824




Lamdba:




Timeout 60 sec place the Lambda function in the same VPC as your RDS



Added VPC execution policy AWSLambdaVPCAccessExecutionRole



assign a security group to the lambda function



In the security attached to the RDS instance, added an inbound rule
for mysql



Confirm that Lambda function has access to the same VPC RDS database




Lambda Error Log




2019-03-28T18:51:47.353Z ab4fbbaf-1ea2-458b-a5b5-781cdfdd80df Error:
connect ETIMEDOUT



at Connection._handleConnectTimeout



(/var/task/node_modules/mysql/lib/Connection.js:411:13)



at Object.onceWrapper (events.js:313:30)



at emitNone (events.js:106:13)



at Socket.emit (events.js:208:7)



at Socket._onTimeout (net.js:420:8)



at ontimeout (timers.js:482:11)



at tryOnTimeout (timers.js:317:5)



at Timer.listOnTimeout (timers.js:277:5)




at Protocol._enqueue
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:144:48)



at Protocol.handshake
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:51:23)



at Connection.connect
(/var/task/node_modules/mysql/lib/Connection.js:118:18)



at Connection._implyConnect
(/var/task/node_modules/mysql/lib/Connection.js:453:10)



at Connection.query
(/var/task/node_modules/mysql/lib/Connection.js:198:8)



at Promise (/var/task/db.js:62:9)



at new Promise ()



at Object.retrieve (/var/task/db.js:55:10)



at exports.getAlerts (/var/task/index.js:59:24)



errorno: 'ETIMEDOUT',



code: 'ETIMEDOUT',



syscall: 'connect',



fatal: true




RDS Error Log




2019-03-28T18:18:49.378320Z 9500 [Note] Aborted connection 9500 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.392514Z 9498 [Note] Aborted connection 9498 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.470617Z 9499 [Note] Aborted connection 9499 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.636775Z 9501 [Note] Aborted connection 9501 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.694669Z 9502 [Note] Aborted connection 9502 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.803457Z 9503 [Note] Aborted connection 9503 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)



2019-03-28T18:18:49.824250Z 9504 [Note] Aborted connection 9504 to db:
'db' user: 'user' host: '123.123.123.123' (Got timeout reading
communication packets)




My db.js query on lambda



const mysql = require('mysql')
let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
let con = mysql.createConnection(dbParams)
con.query(sql, objectArr, (err2, results) =>
con.end()
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)



My test.js script



const request = require('request')
let errorCount = 0
let success = 0

for (let i = 0; i < 4000; i++)
console.log('Send')
request.get('https://myapi/users',
headers:
'client_id': 'app',
'Content-Type': 'application/json'

, (error, response, body) =>
if (error)
console.log('some error')
errorCount++
else
let jsonBody = JSON.parse(body)
if (jsonBody.code === 0)
success++
else
errorCount++



console.log('Success: ', success)
console.log('Error: ', errorCount)
)



Edit:
I also tried to change the i < 1 in test script, then it always gives me "Error: connect ETIMEDOUT. But with i < 900, it works successfully sometime



index.js



const db = require('./db.js')
exports.getUsers = async (event, context) =>
context.callbackWaitsForEmptyEventLoop = false
try
let sql = 'SELECT * FROM User'
let abc = await db.retrieve(sql, [], 'user')

let response =
statusCode: 200,
abc: abc,
code: 0

return response
catch (err)
console.log(err)
errorHandler(err)




db.js with Pool



const mysql = require('mysql')
const constants = require('./constants.js')

let dbParams =
host: constants.SQL_CONNECTION_HOST,
user: constants.SQL_CONNECTION_USER,
password: constants.SQL_CONNECTION_PASSWORD,
database: constants.SQL_CONNECTION_DATABASE,
multipleStatements: true,
maxConnections: 4


const pool = mysql.createPool(dbParams)
let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
pool.getConnection((err1, con) =>
if (err1)
console.log(err1)
return reject(new apiError.DatabaseError('An error occurred in retrieve pool'))

console.log('Pool connect successfully')
con.query(sql, objectArr, (err2, results) =>
con.end()
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)
)



Error Log after used pool




2019-03-28T23:35:24.144Z 91b0fc78-e4d1-4fd9-bdf7-923715b165c0 Error:
Handshake inactivity timeout



at Handshake.
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:163:17)



at emitNone (events.js:106:13)



at Handshake.emit (events.js:208:7)



at Handshake._onTimeout
(/var/task/node_modules/mysql/lib/protocol/sequences/Sequence.js:124:8)



at Timer._onTimeout
(/var/task/node_modules/mysql/lib/protocol/Timer.js:32:23)



at ontimeout (timers.js:482:11)



at tryOnTimeout (timers.js:317:5)



at Timer.listOnTimeout (timers.js:277:5)




at Protocol._enqueue
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:144:48)



at Protocol.handshake
(/var/task/node_modules/mysql/lib/protocol/Protocol.js:51:23)



at PoolConnection.connect
(/var/task/node_modules/mysql/lib/Connection.js:118:18)



at Pool.getConnection (/var/task/node_modules/mysql/lib/Pool.js:48:16)



at Promise (/var/task/db.js:72:10)



at new Promise ()



at Object.retrieve (/var/task/db.js:67:10)



at exports.getAlerts (/var/task/index.js:59:24)



code: 'PROTOCOL_SEQUENCE_TIMEOUT',



fatal: true,



timeout: 10000




Set with Pool now and test it with request loop:



i < 100 result => Success: 866 and Error: 134 requests.



i < 10 result => Success: 8 and Error: 2 requests.



Error with Handshake inactivity timeout



db.js with con.createConnection outside



const mysql = require('mysql')
// initialize dbParams
let con = mysql.createConnection(dbParams)

let retrieve = (sql, objectArr, entityName) =>
return new Promise((resolve, reject) =>
con.query(sql, objectArr, (err2, results) =>
//con.end() commet out connection end here
if (err2)
console.log(err2)
return reject(new apiError.DatabaseError('An error occurred in retrieve'))

console.log('Data retrieve successfully')
return resolve(results)
)
)







mysql node.js aws-lambda load-testing serverless






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 29 at 0:04







chan3600

















asked Mar 28 at 19:27









chan3600chan3600

1501 gold badge3 silver badges14 bronze badges




1501 gold badge3 silver badges14 bronze badges















  • How many times is "a large number of times" and over how long of an interval did you do this? (example, 1000 times in 60 seconds)

    – Michael - sqlbot
    Mar 28 at 23:05











  • SELECT * is mostly NEVER a good choice, especially without any limit... Maybe if you query less data it will take less time to retrieve it and timeout after more iterations. It is a nice test to stress all your system though

    – Zyigh
    Mar 28 at 23:25











  • @Zyigh I currently have only 3 row data in the User table. I will set a limit after

    – chan3600
    Mar 28 at 23:28












  • @Michael - sqlbot I have set with Pool now and test it with i < 100 request loop. And resulting Success: 866 and Error: 134 requests. Error with Handshake inactivity timeout

    – chan3600
    Mar 28 at 23:45












  • So... 1000 attempts over what period of time? Read up on MySQL's thread_cache_size -- while probably not the entire issue, a MySQL server is not able to accept an indefinite number of connections in a short time, due to the overhead of OS thread creation. The thread cache allows the server to keep them around for reuse.

    – Michael - sqlbot
    Mar 29 at 0:13

















  • How many times is "a large number of times" and over how long of an interval did you do this? (example, 1000 times in 60 seconds)

    – Michael - sqlbot
    Mar 28 at 23:05











  • SELECT * is mostly NEVER a good choice, especially without any limit... Maybe if you query less data it will take less time to retrieve it and timeout after more iterations. It is a nice test to stress all your system though

    – Zyigh
    Mar 28 at 23:25











  • @Zyigh I currently have only 3 row data in the User table. I will set a limit after

    – chan3600
    Mar 28 at 23:28












  • @Michael - sqlbot I have set with Pool now and test it with i < 100 request loop. And resulting Success: 866 and Error: 134 requests. Error with Handshake inactivity timeout

    – chan3600
    Mar 28 at 23:45












  • So... 1000 attempts over what period of time? Read up on MySQL's thread_cache_size -- while probably not the entire issue, a MySQL server is not able to accept an indefinite number of connections in a short time, due to the overhead of OS thread creation. The thread cache allows the server to keep them around for reuse.

    – Michael - sqlbot
    Mar 29 at 0:13
















How many times is "a large number of times" and over how long of an interval did you do this? (example, 1000 times in 60 seconds)

– Michael - sqlbot
Mar 28 at 23:05





How many times is "a large number of times" and over how long of an interval did you do this? (example, 1000 times in 60 seconds)

– Michael - sqlbot
Mar 28 at 23:05













SELECT * is mostly NEVER a good choice, especially without any limit... Maybe if you query less data it will take less time to retrieve it and timeout after more iterations. It is a nice test to stress all your system though

– Zyigh
Mar 28 at 23:25





SELECT * is mostly NEVER a good choice, especially without any limit... Maybe if you query less data it will take less time to retrieve it and timeout after more iterations. It is a nice test to stress all your system though

– Zyigh
Mar 28 at 23:25













@Zyigh I currently have only 3 row data in the User table. I will set a limit after

– chan3600
Mar 28 at 23:28






@Zyigh I currently have only 3 row data in the User table. I will set a limit after

– chan3600
Mar 28 at 23:28














@Michael - sqlbot I have set with Pool now and test it with i < 100 request loop. And resulting Success: 866 and Error: 134 requests. Error with Handshake inactivity timeout

– chan3600
Mar 28 at 23:45






@Michael - sqlbot I have set with Pool now and test it with i < 100 request loop. And resulting Success: 866 and Error: 134 requests. Error with Handshake inactivity timeout

– chan3600
Mar 28 at 23:45














So... 1000 attempts over what period of time? Read up on MySQL's thread_cache_size -- while probably not the entire issue, a MySQL server is not able to accept an indefinite number of connections in a short time, due to the overhead of OS thread creation. The thread cache allows the server to keep them around for reuse.

– Michael - sqlbot
Mar 29 at 0:13





So... 1000 attempts over what period of time? Read up on MySQL's thread_cache_size -- while probably not the entire issue, a MySQL server is not able to accept an indefinite number of connections in a short time, due to the overhead of OS thread creation. The thread cache allows the server to keep them around for reuse.

– Michael - sqlbot
Mar 29 at 0:13












1 Answer
1






active

oldest

votes


















0
















It is not explained in the question how does the retrieve function is being called inside your lambda function.



Even though, it strongly seems that it will be executed for each iteration inside your test, which creates a very large number of connections and may explain the behavior you see.



I suggest creating the connection at lambda initialization time (aka 'coldstart'), by moving the code line let con = mysql.createConnection(dbParams) outside of any function (so that only a single connection will take place).



Another good option is to use connection pooling.






share|improve this answer

























  • I tried with Pool, it also happens the same behavior with "Error: Handshake inactivity timeout". I have edited with index.js and db.js with Pool in post

    – chan3600
    Mar 28 at 23:32












  • So please try to initialize the connection once as suggested

    – Ronyis
    Mar 28 at 23:46











  • I updated with let con = mysql.createConnection outside the function, but it also gives "Error: connect ETIMEDOUT". I provided the script on edit

    – chan3600
    Mar 29 at 0:02












  • Thanks. I found the issue, I assigned extra VPC subnet and availability zone which the server is not part of the subnet. Now, I changed my lambda function with only the database subnet and it works with no issue with 1000 connections

    – chan3600
    Mar 29 at 1:04












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55405486%2flambda-function-error-connect-etimedout-when-receive-too-many-requests-for-my%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0
















It is not explained in the question how does the retrieve function is being called inside your lambda function.



Even though, it strongly seems that it will be executed for each iteration inside your test, which creates a very large number of connections and may explain the behavior you see.



I suggest creating the connection at lambda initialization time (aka 'coldstart'), by moving the code line let con = mysql.createConnection(dbParams) outside of any function (so that only a single connection will take place).



Another good option is to use connection pooling.






share|improve this answer

























  • I tried with Pool, it also happens the same behavior with "Error: Handshake inactivity timeout". I have edited with index.js and db.js with Pool in post

    – chan3600
    Mar 28 at 23:32












  • So please try to initialize the connection once as suggested

    – Ronyis
    Mar 28 at 23:46











  • I updated with let con = mysql.createConnection outside the function, but it also gives "Error: connect ETIMEDOUT". I provided the script on edit

    – chan3600
    Mar 29 at 0:02












  • Thanks. I found the issue, I assigned extra VPC subnet and availability zone which the server is not part of the subnet. Now, I changed my lambda function with only the database subnet and it works with no issue with 1000 connections

    – chan3600
    Mar 29 at 1:04















0
















It is not explained in the question how does the retrieve function is being called inside your lambda function.



Even though, it strongly seems that it will be executed for each iteration inside your test, which creates a very large number of connections and may explain the behavior you see.



I suggest creating the connection at lambda initialization time (aka 'coldstart'), by moving the code line let con = mysql.createConnection(dbParams) outside of any function (so that only a single connection will take place).



Another good option is to use connection pooling.






share|improve this answer

























  • I tried with Pool, it also happens the same behavior with "Error: Handshake inactivity timeout". I have edited with index.js and db.js with Pool in post

    – chan3600
    Mar 28 at 23:32












  • So please try to initialize the connection once as suggested

    – Ronyis
    Mar 28 at 23:46











  • I updated with let con = mysql.createConnection outside the function, but it also gives "Error: connect ETIMEDOUT". I provided the script on edit

    – chan3600
    Mar 29 at 0:02












  • Thanks. I found the issue, I assigned extra VPC subnet and availability zone which the server is not part of the subnet. Now, I changed my lambda function with only the database subnet and it works with no issue with 1000 connections

    – chan3600
    Mar 29 at 1:04













0














0










0









It is not explained in the question how does the retrieve function is being called inside your lambda function.



Even though, it strongly seems that it will be executed for each iteration inside your test, which creates a very large number of connections and may explain the behavior you see.



I suggest creating the connection at lambda initialization time (aka 'coldstart'), by moving the code line let con = mysql.createConnection(dbParams) outside of any function (so that only a single connection will take place).



Another good option is to use connection pooling.






share|improve this answer













It is not explained in the question how does the retrieve function is being called inside your lambda function.



Even though, it strongly seems that it will be executed for each iteration inside your test, which creates a very large number of connections and may explain the behavior you see.



I suggest creating the connection at lambda initialization time (aka 'coldstart'), by moving the code line let con = mysql.createConnection(dbParams) outside of any function (so that only a single connection will take place).



Another good option is to use connection pooling.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 28 at 22:56









RonyisRonyis

7316 silver badges12 bronze badges




7316 silver badges12 bronze badges















  • I tried with Pool, it also happens the same behavior with "Error: Handshake inactivity timeout". I have edited with index.js and db.js with Pool in post

    – chan3600
    Mar 28 at 23:32












  • So please try to initialize the connection once as suggested

    – Ronyis
    Mar 28 at 23:46











  • I updated with let con = mysql.createConnection outside the function, but it also gives "Error: connect ETIMEDOUT". I provided the script on edit

    – chan3600
    Mar 29 at 0:02












  • Thanks. I found the issue, I assigned extra VPC subnet and availability zone which the server is not part of the subnet. Now, I changed my lambda function with only the database subnet and it works with no issue with 1000 connections

    – chan3600
    Mar 29 at 1:04

















  • I tried with Pool, it also happens the same behavior with "Error: Handshake inactivity timeout". I have edited with index.js and db.js with Pool in post

    – chan3600
    Mar 28 at 23:32












  • So please try to initialize the connection once as suggested

    – Ronyis
    Mar 28 at 23:46











  • I updated with let con = mysql.createConnection outside the function, but it also gives "Error: connect ETIMEDOUT". I provided the script on edit

    – chan3600
    Mar 29 at 0:02












  • Thanks. I found the issue, I assigned extra VPC subnet and availability zone which the server is not part of the subnet. Now, I changed my lambda function with only the database subnet and it works with no issue with 1000 connections

    – chan3600
    Mar 29 at 1:04
















I tried with Pool, it also happens the same behavior with "Error: Handshake inactivity timeout". I have edited with index.js and db.js with Pool in post

– chan3600
Mar 28 at 23:32






I tried with Pool, it also happens the same behavior with "Error: Handshake inactivity timeout". I have edited with index.js and db.js with Pool in post

– chan3600
Mar 28 at 23:32














So please try to initialize the connection once as suggested

– Ronyis
Mar 28 at 23:46





So please try to initialize the connection once as suggested

– Ronyis
Mar 28 at 23:46













I updated with let con = mysql.createConnection outside the function, but it also gives "Error: connect ETIMEDOUT". I provided the script on edit

– chan3600
Mar 29 at 0:02






I updated with let con = mysql.createConnection outside the function, but it also gives "Error: connect ETIMEDOUT". I provided the script on edit

– chan3600
Mar 29 at 0:02














Thanks. I found the issue, I assigned extra VPC subnet and availability zone which the server is not part of the subnet. Now, I changed my lambda function with only the database subnet and it works with no issue with 1000 connections

– chan3600
Mar 29 at 1:04





Thanks. I found the issue, I assigned extra VPC subnet and availability zone which the server is not part of the subnet. Now, I changed my lambda function with only the database subnet and it works with no issue with 1000 connections

– chan3600
Mar 29 at 1:04




















draft saved

draft discarded















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55405486%2flambda-function-error-connect-etimedout-when-receive-too-many-requests-for-my%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript