{"action":"closed","issue":{"url":"https://api.github.com/repos/orientechnologies/orientjs/issues/198","repository_url":"https://api.github.com/repos/orientechnologies/orientjs","labels_url":"https://api.github.com/repos/orientechnologies/orientjs/issues/198/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientjs/issues/198/comments","events_url":"https://api.github.com/repos/orientechnologies/orientjs/issues/198/events","html_url":"https://github.com/orientechnologies/orientjs/issues/198","id":173783220,"number":198,"title":"Query reject","user":{"login":"facelessTT","id":18587840,"avatar_url":"https://avatars.githubusercontent.com/u/18587840?v=3","gravatar_id":"","url":"https://api.github.com/users/facelessTT","html_url":"https://github.com/facelessTT","followers_url":"https://api.github.com/users/facelessTT/followers","following_url":"https://api.github.com/users/facelessTT/following{/other_user}","gists_url":"https://api.github.com/users/facelessTT/gists{/gist_id}","starred_url":"https://api.github.com/users/facelessTT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facelessTT/subscriptions","organizations_url":"https://api.github.com/users/facelessTT/orgs","repos_url":"https://api.github.com/users/facelessTT/repos","events_url":"https://api.github.com/users/facelessTT/events{/privacy}","received_events_url":"https://api.github.com/users/facelessTT/received_events","type":"User","site_admin":false},"labels":[{"id":94263109,"url":"https://api.github.com/repos/orientechnologies/orientjs/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"maggiolo00","id":98812,"avatar_url":"https://avatars.githubusercontent.com/u/98812?v=3","gravatar_id":"","url":"https://api.github.com/users/maggiolo00","html_url":"https://github.com/maggiolo00","followers_url":"https://api.github.com/users/maggiolo00/followers","following_url":"https://api.github.com/users/maggiolo00/following{/other_user}","gists_url":"https://api.github.com/users/maggiolo00/gists{/gist_id}","starred_url":"https://api.github.com/users/maggiolo00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggiolo00/subscriptions","organizations_url":"https://api.github.com/users/maggiolo00/orgs","repos_url":"https://api.github.com/users/maggiolo00/repos","events_url":"https://api.github.com/users/maggiolo00/events{/privacy}","received_events_url":"https://api.github.com/users/maggiolo00/received_events","type":"User","site_admin":false},"assignees":[{"login":"maggiolo00","id":98812,"avatar_url":"https://avatars.githubusercontent.com/u/98812?v=3","gravatar_id":"","url":"https://api.github.com/users/maggiolo00","html_url":"https://github.com/maggiolo00","followers_url":"https://api.github.com/users/maggiolo00/followers","following_url":"https://api.github.com/users/maggiolo00/following{/other_user}","gists_url":"https://api.github.com/users/maggiolo00/gists{/gist_id}","starred_url":"https://api.github.com/users/maggiolo00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggiolo00/subscriptions","organizations_url":"https://api.github.com/users/maggiolo00/orgs","repos_url":"https://api.github.com/users/maggiolo00/repos","events_url":"https://api.github.com/users/maggiolo00/events{/privacy}","received_events_url":"https://api.github.com/users/maggiolo00/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2016-08-29T14:09:05Z","updated_at":"2016-10-28T13:32:50Z","closed_at":"2016-10-28T13:32:50Z","body":"Hello\r\nsubj does not always occures.\r\nIn some reasons, If I have 5 connections in pool, and one of them getting wrong syntax query, It gets freezed... so all the following queries are placed to the queue, and not getting executed. So in few hours we have our servers working slower and slower(because more and more connections are getting freezed), and only help is restart services.\r\n\r\n```\r\nreturn self.getQueryString(command, filter)\r\n\t\t    .then(function (queryData) {\r\n\t\t\t    var queryAsString = stringFormat(queryData.selectStatement, queryData.queryParams);\r\n\t\t\t\tvar maxQueue = _.max(self.db.server.transport.pool.connections, function(connection) { return connection.queue.length }).queue.length;\r\n\t\t\t    if (maxQueue) {\r\n\t\t\t\t    console.log('waiting for queries: ' + maxQueue);// here is the place we have uncontrolled growth sometimes\r\n\t\t\t    }\r\n\t\t\t    return self.db.query(queryData.selectStatement, {\r\n\t\t\t\t    params: queryData.queryParams\r\n\t\t\t    })\r\n\t\t\t    .then(function (data) {\r\n\t\t\t        var q = queryAsString;\r\n\t\t\t\t    var total = (filter.offset ? filter.offset : 0) + data.length;\r\n\t\t\t\t    return Promise.resolve(data);\r\n\t\t\t    })\r\n\t\t\t    .catch(function (err) {\r\nreturn Promise.reject(err);//we newer hit this place during last month or so....\r\n\t\t\t    })\r\n\r\n```\r\n\r\n\r\n\r\n\r\nIn case if it does matter, we also have event, which seems to fire (when error occures)\r\n\r\n\tthis.db.on(\"endQuery\", function (obj) {\r\n\t\tif (obj.err)\r\n\t\t\tconsole.error(obj.err);\r\n\r\n\t\tvar queryPerformance = obj && obj.perf && obj.perf.query ? obj.perf.query : -1;\r\n\t\tconsole.log('query performance:' + queryPerformance, 'query-performance');\r\n\t});\r\n"}}
{"actor":{"display_login":"maggiolo00"}}