Code Monkey home page Code Monkey logo

Comments (8)

xplicit avatar xplicit commented on June 1, 2024

HyperfastCgi v0.3 has other starting arguments and other config file than v0.4. Your config file and command line are suitable for version 0.4. For version 0.3 you should use /socket command line parameter to set up the socket information.

from hyperfastcgi.

robertmircea avatar robertmircea commented on June 1, 2024
  1. Thanks! After building from master, the server has started. Now I am getting permission denied in nginx log when trying to load the page. Nginx runs under www-data user. HyperfastCgi is started as a different user (vagrant). Is there a way to control from config the permissions for the unix socket so that www-data has access?

  2. When stopping the app, shouldn't the app destroy the unix socket? Now it seems to be left behind and on next start of the app, it throws with libev.c:493: Listen(): Error binding listening socket: 98 (Address already in use). It requires manual deletion of the socket file before

from hyperfastcgi.

xplicit avatar xplicit commented on June 1, 2024
  1. If you don't have the ability to run hyperfastcgi under www-data user (for example by using su - www-data -c 'hyperfastcgi4 ...' command) you can change the permissions of the socket file to 777, after running hyperfastcgi.
  2. I'll look close what is going on here. It should release all opened sockets, maybe this is a side-effect of permissions issue.

from hyperfastcgi.

robertmircea avatar robertmircea commented on June 1, 2024

Regarding 1, for production readiness, it would be nice to have a configuration option to specify the user/group for the socket. su - www-data is a bit complicated since you either issue the su command as root or, if you are like me, running under a regular user, you need to set a password for www-data which is not what you typically do in production scenario.

from hyperfastcgi.

robertmircea avatar robertmircea commented on June 1, 2024

One more thing... I don't know the source, but on console, I see the following timeout issues:

mono 4.0/HyperFastCgi.exe /config=/usr/lib/hyperfastcgi/server.config  /stopable       
[2014-08-05 01:11:20Z] Debug   Register native transport
host-list.c:38: register_host():    ssbench3:81:/:/var/www/nginx-mono host=0x7f0e95770d78 pinned_host=0x7f0e95770d78 domain=0x7f0e8c052850
libev.c:461: Listen():  libevent version: 2.0.19-stable
libev.c:475: Listen():  libevent is using epoll for events.
Hit Return to stop the server.
libev.c:331: cmd_error():   Remote host on fd 10 timed out.
libev.c:331: cmd_error():   Remote host on fd 4 timed out.

from hyperfastcgi.

xplicit avatar xplicit commented on June 1, 2024

This is not an error, this is an debug output which I was going to remove, but did not do yet.

from hyperfastcgi.

xplicit avatar xplicit commented on June 1, 2024

Another way to avoid permission issues with socket file and without using su command

mkdir /somepath/hfc-socket
sudo chown :www-data /somepath/hfc-socket
sudo chmod g+s /somepath/hfc-socket

Use unix:/somepath/hfc-socket/fastcgi.socket in nginx config and

 <listener .... >
    <protocol>Unix</protocol>
    <address>/somepath/hfc-socket/fastcgi.socket</address>
 </listener>

in hyperfastcgi configs

In this case all files are created by Hyperfastcgi will get www-data group permission and will be available to nginx for reading/writing operations

from hyperfastcgi.

xplicit avatar xplicit commented on June 1, 2024

fde9fa4 removes this timeout messages

from hyperfastcgi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.