unix1 / cowboy_fcgi Goto Github PK
View Code? Open in Web Editor NEWFastCGI handler for Cowboy web server
License: ISC License
FastCGI handler for Cowboy web server
License: ISC License
Steps to repro:
make run
the example curl --http2 -v http://localhost:33080/hello.php
Expected result: response from hello.php
Actual result:
...
http2 error: Invalid HTTP header field was received: frame type: 1, stream: 1, name: [Content-Type], value: [text/plain;charset=UTF-8]
...
Steps to repro:
make run
the examplefoo/bar.php
file with some PHP content under priv/www
directory/foo/bar.php
Expected result: bar.php
executes and its response is received by the client.
Actual result: Cowboy 404 response.
While remaining compatible with rebar3 per #3 move Makefile
to use erlang.mk.
Requirements:
While testing the fcgi client on Cowboy 2.0.0 using siege
, after making some thousands of requests cowboy/ranch will report a crash such as this:
Ranch listener fcgi, connection process <0.830.4>,
stream 1 had its request process <0.842.4> exit with reason {case_clause,undefined}
and stacktrace
[
{cowboy_http_fcgi,init,2,[{file,"src/cowboy_http_fcgi.erl"},{line,61}]},
{cowboy_handler,execute,2, [{file,"src/cowboy_handler.erl"},{line,37}]},
{cowboy_stream_h,execute,3, [{file,"src/cowboy_stream_h.erl"},{line,205}]}
{cowboy_stream_h,request_process,3,[{file,"src/cowboy_stream_h.erl"},{line,184}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}
]
For few seconds the test "hangs" waiting for responses. The requests eventually time out after exactly 15 seconds with 504
(gateway timeout) responses. After this the system recovers and requests may continue.
Line 61-62 in cowboy_http_fcgi
are
State = case whereis(Name) of
Server when is_pid(Server) ->
This means whereis
is probably not finding the locally registered process anymore. This means the process has likely crashed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.