Skip to content

SQL30081N on IBM DB2 with Flex Plan #9

@akhilruhela

Description

@akhilruhela

While storing session in DB2 with a flex plan not a free one we are getting the below error if application is idle for some time.
I have gone through the Db2Store documentation and says that to cleanly close the connection use
sessionStore.close(function(error){
if(error){
// deal with it
return;
}
});


Error on Production:
ERR Error: [IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "...*". Communication function detecting the error: "send". Protocol specific error code(s): "32", "*", "0". SQLSTATE=08001
• Sep 3 02:27:32 cloudfoundry ***-**Prod ERR Error: CLI0600E Invalid connection handle or connection is closed. SQLSTATE=S1000

Here is my code snippet

let session = require('express-session');
var Db2Store = require('connect-db2')(session);
var options = {
host: process.env.DB_HOST,
port: 50001,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: "BLUDB",
use_ssl: true

};
app.use(session({
resave: false, saveUninitialized: 'true', secret: 'you know nothing', store: sessionStore, cookie: {
secure: true
}
}));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions