Forum

cURL

BSmither
30 March 2014, 06:20
With respect to: https://www.hiawatha-webserver.org/forum/topic/1582/#8350

This is still a problem.

I ask that I try some sort of diagnostic tool that will show why Hiawatha is responding with 500-ISE.

Hiawatha version: 9.4
Operating System: WinXPSP3

(I have to mention that Abyss web server with PHP FastCGI on the same system works fine.)
Hugo Leisink
30 March 2014, 07:45
Please send all your test scripts by e-mail and I will do some testing myself.
BSmither
31 March 2014, 07:01
I tried nginx and it, too, behaved the same way as Hiawatha.

I have come across some info that, in Windows, PHP FastCGI cannot call itself.

That is to say, the FastCGI server is at 127.0.0.1:2005, and a cURL call is made to 127.0.0.1/script.php, which passes it to the server at 127.0.0.1:2005 -- but that worker process is already busy.

In Windows, something called PHP_FCGI_CHILDREN is ignored. I don't understand it completely. And another setting, PHP_FCGI_MAXREQUESTS(?) is outside my expertise as well. I just know that the PHP FastCGI server will quit for no apparent reason, and I have to manually restart it.
BSmither
31 March 2014, 07:09
Typo: ...which the web server passes the name of the script to be executed to the server at 127.0.0.1:2005...

I am able to get the cURL diagnostics, and nginx reports a 504 Gateway error. This narrows things down a bit. After the FastCGI process times out, what was "blocked" can now finish and the script called by cURL runs to completion. This is evidenced by entries in the access log, phpError log, and my own tracer log.
Hugo Leisink
31 March 2014, 09:04
What PHP_FCGI_MAXREQUESTS defines is the maximum amount of requests one PHP instance is allowed to handle. After that, it needs to be respawned. You need a PHP process manager (like php-fpm) for that. PHP_FCGI_CHILDREN is ignored by a PHP process, because it doesn't need it. It's the PHP process manager that needs it to know how many children at the same time need to be spawned. Note that php-fpm doesn't use the PHP_FCGI_CHILDREN setting, it has its own configuration file.
BSmither
31 March 2014, 19:25
Regarding the comments made earlier, do you agree with any of it? Does any of it give you an idea of how to get Hiawatha to:
* test if the FastCGI server is ready to receive a new file to execute (within the environment/situation causing the blockage)
* based on the response, or lack of one, try a specific approach to get the server's attention?

Would this article (substitute Hiawatha) still be relevant?
http://www.softwareprojects.com/resources/programming/t-how-to-install-nginx-php-php-fpm-and-mysql-under-1616.html
Hugo Leisink
3 April 2014, 00:42
I think you need to dig into how to properly run PHP as FastCGI daemon under Windows.
This topic has been closed.