having some trouble proxying a node application via vhosts and would greatly appreciate any help:
my app works fine if i run node /usr/local/lsws/fcgi-bin/lsnode.js from the bash prompt, whether as root or the owner of the app. i can curl it just fine. but if i have it setup as a vhost context config, it just hangs—timeout error.
vhost conf:
context /api {
type appserver
location /home/mysite.com/app
binPath /bin/node
appType node
maxConns 100
rewrite {
}
addDefaultCharset off
}
error:
Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase ‘Connection Timeout’.
and the error log:
2020-04-07 03:37:27.849954 [NOTICE] [LocalWorker::workerExec] VHost:mysite.com suExec check uid 99 gid 99 setuidmode 0.
2020-04-07 03:37:27.849984 [NOTICE] [LocalWorker::workerExec] Config[Node:mysite.com:/api]: suExec uid 99 gid 99 cmd /bin/node /usr/local/lsws/fcgi-bin/lsnode.js, final uid 99 gid 99.
2020-04-07 03:37:27.851083 [NOTICE] [Node:mysite.com:/api] add child process pid: 66195.
GET /api/add HTTP/1.1
Host: mysite.com
Connection: keep-alive
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36 Edg/80.0.361.109
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip
Accept-Language: en-US,en;q=0.9
Cookie: __cfduid=d0eaf6bdad767429fcbd638800e26ad131586216468
X-Forwarded-Host: mysite.com
X-Forwarded-For: XX.XX.XX.XX
2020-04-07 03:37:29.066219 [INFO] Process with PID: 66195 is dead
2020-04-07 03:42:28.726306 [INFO] [XX.XX.XX.XX:33308#mysite.com] Connection idle time too long: 301 while in state: 6 watching for event: 0, close!
2020-04-07 03:42:28.726355 [INFO] [XX.XX.XX.XX:33308] Content len: 0, Request line:
GET /api/add HTTP/1.1
2020-04-07 03:42:28.726362 [INFO] [XX.XX.XX.XX:33308#mysite.com] HttpExtConnector state: 8, request body sent: 0, response body size: -2, response body sent:0, left in buffer: 0, attempts: 0.
2020-04-07 03:42:28.726369 [INFO] [XX.XX.XX.XX:33308#mysite.com] Proxy connection state: 2, watching event: 25, Request header:599, body:0, sent:0, Response header: 0, total: 0 bytes received in 301 seconds,Total processing time: 301.
2020-04-07 03:47:29.066920 [NOTICE] [Node:mysite.com:/api] stop worker processes