Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

node-fastcgi compatibility with node ≥ 0.11.8 #8988

Closed
ebraminio opened this issue Jan 7, 2015 · 10 comments
Closed

node-fastcgi compatibility with node ≥ 0.11.8 #8988

ebraminio opened this issue Jan 7, 2015 · 10 comments

Comments

@ebraminio
Copy link

I've filed this bug on node-fastcgi bug tracker also. I think it could be a more general compatibility issue for next release of node so I am reporting it here also:

First have a look at node-fastcgi and the bug I've filed there. Here is my configurations:

.lighttpd.conf:

server.document-root = "."
server.modules += ( "mod_fastcgi" )
server.port = 2020
fastcgi.server += (
  "/myapp" => ((
    "socket" => "/tmp/myapp-fcgi.sock",
    "bin-path" => "/home/user/myapp/server.js",
    "check-local" => "disable",
    "max-procs" => 1,
  ))
)

server.js:

#!/home/user/.nvm/v0.11.8/bin/node

var fcgi = require('node-fastcgi');

fcgi.createServer(function(req, res) {
  if (req.method === 'GET') {
    res.writeHead(200, { 'Content-Type': 'text/plain' });
    res.end("It's working");
  } else {
    res.writeHead(501);
    res.end();
  }
}).listen();

Do chmod +x server.js and npm install node-fastcgi then lighttpd -f .lighttpd.conf -D and open http://127.0.0.1:2020/myapp on your browser. It works if you install 0.11.7 and change server.js to use it but for 0.11.8 and newer node versions, it just makes browser waiting forever and does nothing.

@cjihrig
Copy link

cjihrig commented Jan 7, 2015

Thanks for reporting this. Let's see what comes from the issue you opened on node-fastcgi. If that module needs to be updated, then it should happen there. If you have an example that doesn't contain any external dependencies and demonstrates a problem with Node core, then we can handle it here.

@cjihrig cjihrig closed this as completed Jan 7, 2015
@ebraminio
Copy link
Author

Interestingly, by more compiling and bisecting I've found that the bug is coming from a libuv upgrade:

So I think it is not just JSish toy code issue and I think this would be better to get more attention, (cc: @tjfontaine ) My naive guess is the issue is on handling unix sockets on newer version of libuv.

@cjihrig
Copy link

cjihrig commented Jan 8, 2015

Wouldn't this be a libuv issue then?

@ebraminio
Copy link
Author

The issue is fixed on libuv but it will be shipped with 1.2.1 and I heard node 0.12 will be shipped with libuv v1.0. Is it possible to fix the issue somehow so node-fcgi (and may a lot more clients that are using node as a child process) wouldn't break on transitioning to Node 0.12?

@saghul
Copy link
Member

saghul commented Jan 14, 2015

I heard node 0.12 will be shipped with libuv v1.0.

How so? Would it help if I made a PR upgrading libuv to 1.2.1?

@ebraminio
Copy link
Author

On other projects sometimes I see a patch is backported to a beta branch. I thought that can work here by reverting the patch caused the regression or the one fixes the issue.

@cjihrig
Copy link

cjihrig commented Jan 16, 2015

@tjfontaine has it been decided what version of libuv will ship with 0.12?

@saghul
Copy link
Member

saghul commented Jan 16, 2015

Here is a PR updating libuv to 1.2.1 #9050

@misterdjules misterdjules added this to the 0.12.1 milestone Feb 3, 2015
@misterdjules
Copy link

Reopening and adding to the 0.12.1 milestone, as the second release candidate for 0.12.0 has already been released, and upgrading libuv to a version that fixes this issue has been determined to be too big a change at this point in the release process.

@misterdjules
Copy link

Fixed with #9179, which should be released with node v0.12.2 (planned tomorrow, Tuesday, but could slip).

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

No branches or pull requests

4 participants