Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 21BC210D45 for ; Mon, 27 Apr 2015 13:39:40 +0000 (UTC) Received: (qmail 35751 invoked by uid 500); 27 Apr 2015 13:39:39 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 35579 invoked by uid 500); 27 Apr 2015 13:39:39 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 35465 invoked by uid 99); 27 Apr 2015 13:39:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2015 13:39:39 +0000 Date: Mon, 27 Apr 2015 13:39:39 +0000 (UTC) From: "Michael Shuler (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-9246) Cassandra driver becomes unresponsive after two exceptions are raised and not caught inside the response callback MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-9246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14514135#comment-14514135 ] Michael Shuler commented on CASSANDRA-9246: ------------------------------------------- or https://datastax-oss.atlassian.net/browse/NODEJS :) > Cassandra driver becomes unresponsive after two exceptions are raised and not caught inside the response callback > ----------------------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-9246 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9246 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: os: both win and linux > framework: tested on both express and total.js frameworks > Reporter: Ehsan > Priority: Critical > Attachments: nodetest1.7z, result.png > > > The driver becomes unresponsive when two two exception are raised and not caught inside the Cassandra driver's response callback. > how to reproduce: > 1- setup a typical express (or total.js) project > 2- add a simple route: > {code:JavaScript} > app.use('/test', test); > {code} > 3- code the route: > {code:JavaScript} > var cassandra = require('cassandra-driver'); > var contactPoints = ['cassandra-dev.nikoo.ir']; > var driver = new cassandra.Client({ > contactPoints: contactPoints, > keyspace: 'nikoomail', > queryOptions: {prepare: true}, > socketOptions: {connectTimeout: 10000} > }); > router.get('/', function(req, res, next) { > console.log(); > console.log('-> Before executing the query'); > driver.execute('SELECT * FROM domain', [], function(err, result) { > console.log('-> After executing the query'); > res.send('respond with a resource'); > throw new Error('Raising an exception here <--'); > }); > }); > {code} > 4- add a global exception handler: > {code:JavaScript} > process.on('uncaughtException', function(err) { > console.error(err); > }); > {code} > 5- run the project: > npm start > 6- navigate to http://localhost:300/test, notice the route works and the "respond with a resource" is seen > 7- redo step (6), > 8- for a third time repeat step (6) and notice the driver does not respond anymore and consequently nothing is received on the client side. > Note: a sample project has been attached reproducing the error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)