" and set the path and parameters; 4. Start the service That’s it."/> " and set the path and parameters; 4. Start the service That’s it.">
Home >Backend Development >PHP Problem >How to solve the problem of nginx php-cgi automatically closing
nginx php-cgi automatic shutdown solution: 1. Download nssm; 2. Unzip it and enter the location of nssm.exe; 3. Execute "nssm install
" and set the path and Parameters; 4. Start the service.
The operating environment of this article: Windows7 system, PHP7.3.1 version, DELL G3 computer
How to solve nginx php- cgi automatic shutdown problem?
Solve the problem of nginx php-cgi automatically exiting in the windows environment:
In the windows environment I am This is how to build the PHP environment:
1. Start nginx
2. Start the php-cgi process
There will be a problem. When the request exceeds a certain number of times, php-cgi will hang up
##How to solve?
The idea is to write a daemon process to protect it so that it can automatically restart after hanging up. How to achieve?Use nssm to encapsulate php-cgi.exe into a service so that it can be protected.
Steps: 1.Downloadnssm, download address: http:// www.nssm.cc/download
2.Extract it and enter the location where nssm.exe is located
3.Executenssm install
##You're done, running nginx php under windows is as smooth as Dove.
Recommended learning: "
PHP Video TutorialThe above is the detailed content of How to solve the problem of nginx php-cgi automatically closing. For more information, please follow other related articles on the PHP Chinese website!