mysql - Web App database ECONNRESET -


i have expressjs application hosted on azure web app on enabled.

i using bookshelfjs connect mysql database hosted in virtual server on azure.

after sometime, when call web application below error, told me failed connect database server:

select * `member` `name` = 'alvin' limit 1 -read econnreset" 

is related expressjs timeout problem?

according similar issue on mysql giving "read econnreset" error after idle time on node.js server, seems mysql connection issue.

as answer said:

mysql indeed prune idle connections.

please try add pool setting in mysql connection configuration in knex. e.g,

var knex = require('knex')({   client: 'mysql',   connection: {     host     : '127.0.0.1',     user     : 'your_database_user',     password : 'your_database_password',     database : 'myapp_test'   },   pool: {     min: 0,     max: 7   } }); 

please refer http://knexjs.org/#installation-pooling more info.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -