marcbachmann / node-html-pdf

This repo isn't maintained anymore as phantomjs got dreprecated a long time ago. Please migrate to headless chrome/puppeteer.
MIT License
3.56k stars 545 forks source link

Phantomjs is unable to scale in pm2 in cluster mode #615

Open optimusleo opened 3 years ago

optimusleo commented 3 years ago

Html-pdf does not work with pm2 in cluster mode, it returns

x app > Error: html-pdf: Received the exit code '1'                                                                                                                 x
x[ 2] app                            Mem: 115 MB    CPU:  0 %  online xx app > Auto configuration failed                                                                                                                                   x
x[ 3] app                            Mem: 112 MB    CPU:  0 %  online xx app > 140093983399552:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so:  x
x                                                                     xx app > 140093983399552:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:                                               x
x                                                                     xx app > 140093983399552:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf                  x
x                                                                     xx app > 140093983399552:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf                                    x
x                                                                     xx app >     at ChildProcess.respond (/home/azureuser/magazineluiza/node_modules/html-pdf/lib/pdf.js:121:31)                                                         x
x                                                                     xx app >     at ChildProcess.emit (events.js:315:20)                                                                                                                 x
x                                                                     xx app >     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)                                                                               x
x                                                                     xx app > Error: html-pdf: Received the exit code '1'                                                                                                                 x
x                                                                     xx app > Auto configuration failed                                                                                                                                   x
x                                                                     xx app > 140093983399552:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so:  x
x                                                                     xx app > 140093983399552:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:                                               x
x                                                                     xx app > 140093983399552:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf                  x
x                                                                     xx app > 140093983399552:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf                                    x
x                                                                     xx app >     at ChildProcess.respond (/home/azureuser/magazineluiza/node_modules/html-pdf/lib/pdf.js:121:31)                                                         x
x                                                                     xx app >     at ChildProcess.emit (events.js:315:20)                                                                                                                 x
x                                                                     xx app >     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)