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

Crashes on mutli-node.js system #50

Closed
wkande opened this issue Jul 21, 2015 · 4 comments
Closed

Crashes on mutli-node.js system #50

wkande opened this issue Jul 21, 2015 · 4 comments

Comments

@wkande
Copy link

wkande commented Jul 21, 2015

Running the following on a single Node.js server is fine.

console.log('create PDF');
pdf.create(html).toBuffer(function(err, buffer){
//console.log('This is a buffer:', Buffer.isBuffer(buffer));
console.log('create PDF async call returned');
try{
posterBuffer = buffer;
callback();
}
catch (err){
callback( err );
}
});

But if you have two servers behind an HAPROXY load balancer both servers crash with (no state):

* START ERROR***
Un-Caught exception (reported from app.js):
{ [Error: write EPIPE] code: 'EPIPE', errno: 'EPIPE', syscall: 'write' }
Error: write EPIPE
at exports._errnoException (util.js:746:11)
at WriteWrap.afterWrite (net.js:775:14)
****************** END ERROR ********************

I read a post about a double callback failure with phantom but now I cannot find it again.

Server OS Ubuntu 14.0.4
Node 12.5

@wkande wkande closed this as completed Jul 22, 2015
@marcbachmann
Copy link
Owner

Hehe, the problem is gone?

@fakenickels
Copy link

@wkande the problem is gone?
how did you solve it?

@marcbachmann
Copy link
Owner

There was never a problem like this (the one in the issue title). EPIPE means that no phantomjs binary is present. So npm install failed somehow.

@fakenickels
Copy link

Oh, I solved it!
I just added phantomjs@1.9.16 in my project package.json and it worked.
@marcbachmann maybe you can replace "optionalDependencies" by "dependencies" in node-html-pdf's package.json to solve this problem.

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

No branches or pull requests

3 participants