{"action":"opened","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/3311","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/3311/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/3311/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/3311/events","html_url":"https://github.com/sequelize/sequelize/issues/3311","id":60326688,"number":3311,"title":"MSSql ETIMEOUT intermittent error","user":{"login":"Bondifrench","id":4905917,"avatar_url":"https://avatars.githubusercontent.com/u/4905917?v=3","gravatar_id":"","url":"https://api.github.com/users/Bondifrench","html_url":"https://github.com/Bondifrench","followers_url":"https://api.github.com/users/Bondifrench/followers","following_url":"https://api.github.com/users/Bondifrench/following{/other_user}","gists_url":"https://api.github.com/users/Bondifrench/gists{/gist_id}","starred_url":"https://api.github.com/users/Bondifrench/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bondifrench/subscriptions","organizations_url":"https://api.github.com/users/Bondifrench/orgs","repos_url":"https://api.github.com/users/Bondifrench/repos","events_url":"https://api.github.com/users/Bondifrench/events{/privacy}","received_events_url":"https://api.github.com/users/Bondifrench/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-09T10:54:45Z","updated_at":"2015-03-09T10:54:45Z","closed_at":null,"body":"Hi,\r\n\r\nI have the following model:\r\n````\r\nvar configDB = require('../config/configMs');\r\nvar Sequelize = require('sequelize');\r\nvar sequelize = new Sequelize(configDB.dbname, configDB.user, configDB.password, {\r\n\thost: 'xxxx.xxxx.net',\r\n\tdialect: \"mssql\",\r\n\tpool: {\r\n\t\tmaxConnections: 5,\r\n\t\tmaxIdleTime: 30000\r\n\t}\r\n});\r\nvar dimEntity = sequelize.define('dimEntity', {\r\n\tId: {\r\n\t\ttype: Sequelize.INTEGER,\r\n\t\tprimaryKey: true,\r\n\t\tallowNull: false\r\n\t},\r\n\tCik: Sequelize.INTEGER,\r\n\tName: Sequelize.STRING,\r\n\tIndustryTypeId: {\r\n\t\ttype: Sequelize.INTEGER,\r\n\t\tfield: 'IndustryTypeId',\r\n\t\treferencesKey: 'id'\r\n\t},\r\n\tIsFund: Sequelize.BOOLEAN,\r\n\tIsCompany: Sequelize.BOOLEAN,\r\n\tFiscalYearEnds: Sequelize.STRING,\r\n\tCreatedOn: Sequelize.DATE,\r\n\tUpdatedOn: Sequelize.DATE,\r\n\tAddressId: Sequelize.INTEGER,\r\n\tCompanyName: Sequelize.STRING,\r\n\tCompNm_1: Sequelize.STRING,\r\n\thasXBRL: Sequelize.BOOLEAN,\r\n\tsicExtern: Sequelize.BOOLEAN,\r\n\taliasName: Sequelize.STRING,\r\n\tStateId: {\r\n\t\ttype: Sequelize.INTEGER,\r\n\t\tfield: 'StateId',\r\n\t\treferencesKey: 'id'\r\n\t}\r\n}, {\r\n\tschema: 'Domain',\r\n\ttableName: 'DimEntity',\r\n\tfreezeTableName: true,\r\n\ttimestamps: false\r\n});\r\n// return dimEntity;\r\n// }\r\nsequelize\r\n\t.sync()\r\n\t.then(function() {\r\n\t\treturn dimEntity.findAll()\r\n\t\t\t.then(function(content) {\r\n\t\t\t\tfor (var i = 0; i < content.length; i++) {\r\n\t\t\t\t\tconsole.log(content[i].dataValues);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t})\r\n\t.catch(function(error) {\r\n\t\tconsole.log('Problem trying to retrieve data: ', error);\r\n\t});\r\n````\r\nI get the following error from time to time:\r\n````\r\nExecuting (default): IF OBJECT_ID('[Domain].[DimEntity]', 'U') IS NULL CREATE TABLE [Domain].[DimEntity] ([Id] INTEGER NOT NULL , [Cik] INTEGER NULL, [Name] NVARCHAR(255) NULL, [IndustryTypeId] INTEGER NULL, [IsFund] BIT NULL, [IsCompany] BIT NULL, [FiscalYearEnds] NVARCHAR(255) NULL, [CreatedOn] DATETIME2 NULL, [UpdatedOn] DATETIME2 NULL, [AddressId] INTEGER NULL, [CompanyName] NVARCHAR(255) NULL, [CompNm_1] NVARCHAR(255) NULL, [hasXBRL] BIT NULL, [sicExtern] BIT NULL, [aliasName] NVARCHAR(255) NULL, [StateId] INTEGER NULL, PRIMARY KEY ([Id]));\r\nExecuting (default): EXEC sys.sp_helpindex @objname = N'[Domain].[DimEntity]';\r\nExecuting (default): SELECT [Id], [Cik], [Name], [IndustryTypeId], [IsFund], [IsCompany], [FiscalYearEnds], [CreatedOn], [UpdatedOn], [AddressId], [CompanyName], [CompNm_1], [hasXBRL], [sicExtern], [aliasName], [StateId] FROM [Domain].[DimEntity] AS [dimEntity];\r\nProblem trying to retrieve data:  { [SequelizeDatabaseError: Timeout: Request failed to complete in 15000ms]\r\n  name: 'SequelizeDatabaseError',\r\n  message: 'Timeout: Request failed to complete in 15000ms',\r\n  parent:\r\n   { [RequestError: Timeout: Request failed to complete in 15000ms]\r\n     name: 'RequestError',\r\n     message: 'Timeout: Request failed to complete in 15000ms',\r\n     code: 'ETIMEOUT',\r\n     sql: 'SELECT [Id], [Cik], [Name], [IndustryTypeId], [IsFund], [IsCompany], [FiscalYearEnds], [CreatedOn], [UpdatedOn], [AddressId], [CompanyName], [CompNm_1], [hasXBRL], [sicExtern], [aliasName], [StateId] FROM [Domain].[DimEntity] AS [dimEntity];' },\r\n  original:\r\n   { [RequestError: Timeout: Request failed to complete in 15000ms]\r\n     name: 'RequestError',\r\n     message: 'Timeout: Request failed to complete in 15000ms',\r\n     code: 'ETIMEOUT',\r\n     sql: 'SELECT [Id], [Cik], [Name], [IndustryTypeId], [IsFund], [IsCompany], [FiscalYearEnds], [CreatedOn], [UpdatedOn], [AddressId], [CompanyName], [CompNm_1], [hasXBRL], [sicExtern], [aliasName], [StateId] FROM [Domain].[DimEntity] AS [dimEntity];' },\r\n  sql: 'SELECT [Id], [Cik], [Name], [IndustryTypeId], [IsFund], [IsCompany], [FiscalYearEnds], [CreatedOn], [UpdatedOn], [AddressId], [CompanyName], [CompNm_1], [hasXBRL], [sicExtern], [aliasName], [StateId] FROM [Domain].[DimEntity] AS [dimEntity];' }\r\n````\r\nI don't always have this error, but I get it 3 out of 4 times. The result is > 18000 rows.\r\nI thought modifying `maxIdleTime` would help, but as you can see in the error It doesn't go beyond 15000ms.\r\n@mbroadst I think you were saying that for MSSql we don't have a connection pool, is it still possi ble to modify the idle time?\r\n@mickhansen One of the columns has an index, so I was wondering if I should modify my model to add one?\r\n\r\nI am using sequelize 2.0.4\r\n\r\nThx"}}