Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing Sockets, invalid clumplet buffer structure #20

Closed
DKunin opened this issue Feb 14, 2013 · 6 comments
Closed

Closing Sockets, invalid clumplet buffer structure #20

DKunin opened this issue Feb 14, 2013 · 6 comments
Labels

Comments

@DKunin
Copy link

DKunin commented Feb 14, 2013

Hi there!

First of all I would like to thank you for a great product! You did an awesome job!

I am having a little trouble thou.
First I am creating one connection to db - then I start quering it several times every 3 seconds, and everythig is well, but in time there is trouble - the Node can Say that "This socket is closed", so next time I try to query - node crashes.
And sometimes db responses with "invalid clumplet buffer structure: string length doesn't match with clumplet" and then also crash.

I have one connection and several seelct queries. Do I need to create a connection for each of them?

Thank you in advance.

@hgourvest
Copy link
Owner

It would be great I you can tell me how to reproduce the error.
You lost firebird socket connection ?
Which Firebird version do you use ?

@DKunin
Copy link
Author

DKunin commented Feb 14, 2013

I'll try to show you.
I use FireBird 2.5.2 on Win7.
So on the node I make a connection

fb = require("node-firebird"),
fb.attach(fboptions,
function(err, db){
if (err) {
logger.fatal("didn't connect, try again",err.message);
throw new Error("db error, reloading");
} else {
logger.info('database connected');
connectonBases['main'] = db;
}
}

Then there are several queries, some of them are made on node and some are requested from client:
For example.
function fEj(d){
var dfd = new jQuery.Deferred();
var base = connectonBases['main'];
try{base.query("select * from EVENT_JOURNAL where NPS_ID='"+d.nps_id+"' order by event_id desc rows "+d.amount+" " ,function(err,res){
dfd.resolve(res);
});} catch(err){
logger.warn("fEj",err.message)
}
return dfd.promise();
};

But there are about a 10 of them. And they all fire every 3 seconds.
Some of them can be quite big, where I fetch about 60 lines with big blobs of data.
Then I emit the result via socket to the client.

So the trouble I get is sometimes "This socket is closed" and sometimes "invalid clumplet buffer structure: string length doesn't match with clumplet" it's quite non-consistent, I can't put my finger on where is the trouble.

I'll be very grateful for any help, maybe I can somehow optimize the queries or increase the number of connections?
Thank you in advance!

@hgourvest
Copy link
Owner

If I can't reproduce your error I can't fix it.
You will have to send me the database and the code that produce these errors.

@DKunin
Copy link
Author

DKunin commented Feb 15, 2013

Thank you for your readiness to help.Unfortunately I can not do that, my boss forbids me due to security reasons. But thanks anyway!

@mariuz
Copy link
Collaborator

mariuz commented Feb 15, 2013

I agree without a test case is hard to verify and reproduce the issue

@Arbane
Copy link

Arbane commented Jul 22, 2013

I have issue any time then i try execute sample code.
Win7, node 0.10.11 (or previous). ANSI coded source file, FB 2.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants